Skip to content

Commit 73f98af

Browse files
committed
MC-19432: REST API returns 404 error instead of 400
1 parent 87f3346 commit 73f98af

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ public function testFailedAddItem(?array $cartItem)
138138
$requestData = [
139139
'cartItem' => $cartItem,
140140
];
141+
142+
$this->expectException(\Exception::class);
143+
$this->expectExceptionCode(TESTS_WEB_API_ADAPTER === self::ADAPTER_SOAP ? 0 : 400);
141144
$this->_webApiCall($serviceInfo, $requestData);
142145
}
143146

0 commit comments

Comments
 (0)