Skip to content

Commit 307fbad

Browse files
AC-12755 Improve web api async
1 parent bd3446a commit 307fbad

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

app/code/Magento/WebapiAsync/Controller/Rest/Asynchronous/InputParamsResolver.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,11 @@ private function validateParameters(
261261
}
262262
}
263263
}
264-
if (!empty($paramOverriders)) {
265-
$message = 'The current request does not expect the next parameters: '
266-
. implode(', ', $paramOverriders);
267-
throw new \UnexpectedValueException(__($message)->__toString());
264+
265+
if (!empty($paramOverriders)) {
266+
$message = 'The current request does not expect the next parameters: '
267+
. implode(', ', $paramOverriders);
268+
throw new \UnexpectedValueException(__($message)->__toString());
268269
}
269270
}
270271
}

dev/tests/api-functional/testsuite/Magento/Quote/Api/GuestCartManagementTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,9 @@ public function testPlaceOrder()
354354
public function testAssignCustomerByGuestUser()
355355
{
356356
$this->expectException(\Exception::class);
357-
$this->expectExceptionMessage('You don\'t have the correct permissions to assign the customer to the cart.');
357+
$this->expectExceptionMessage(
358+
'{"message":"\"%fieldName\" is required. Enter and try again.","parameters":{"fieldName":"customerId"}}'
359+
);
358360

359361
/** @var $quote \Magento\Quote\Model\Quote */
360362
$quote = $this->objectManager->create(\Magento\Quote\Model\Quote::class)->load('test01', 'reserved_order_id');

0 commit comments

Comments
 (0)