Skip to content

Internal Server Error in /V1/guest-carts/{cartId}/billing-address API Endpoint #35938

@mlf20

Description

@mlf20

Preconditions and environment

  • Magento version 2.4

Steps to reproduce

  1. Retrieve auth token from the admin endpoint /V1/integration/admin/
  2. Request endpoint:
curl -H 'Content-Type: application/json' -H 'Authorization: Bearer' <AUTH TOKEN> -d '{}' -X POST http://<MAGENTO_URL>/pub/rest/default/V1/guest-carts/BE/billing-address?address=%22%5B%5D%22&useForShipping=False

Expected result

Returns a 400 error as the request is malformed.

Actual result

Returns a 500 status code from a null TypeError .

Additional information

output of var/log/system.log:


	[2022-08-10T14:40:29.224837+00:00] main.CRITICAL: TypeError: Magento\InventoryInStorePickupQuote\Plugin\Quote\DoNotUseBillingAddressForShipping::beforeAssign(): Argument #2 ($cartId) must be of type int, null given, called in /magento/vendor/magento/framework/Interception/Interceptor.php on line 121 and defined in /magento/vendor/magento/module-inventory-in-store-pickup-quote/Plugin/Quote/DoNotUseBillingAddressForShipping.php:55
	Stack trace:
	#0 /magento/vendor/magento/framework/Interception/Interceptor.php(121): Magento\InventoryInStorePickupQuote\Plugin\Quote\DoNotUseBillingAddressForShipping->beforeAssign()
	#1 /magento/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Quote\Model\BillingAddressManagement\Interceptor->Magento\Framework\Interception\{closure}()
	#2 /magento/generated/code/Magento/Quote/Model/BillingAddressManagement/Interceptor.php(23): Magento\Quote\Model\BillingAddressManagement\Interceptor->___callPlugins()
	#3 /magento/vendor/magento/module-quote/Model/GuestCart/GuestBillingAddressManagement.php(49): Magento\Quote\Model\BillingAddressManagement\Interceptor->assign()
	#4 [internal function]: Magento\Quote\Model\GuestCart\GuestBillingAddressManagement->assign()
	#5 /magento/vendor/magento/module-webapi/Controller/Rest/SynchronousRequestProcessor.php(95): call_user_func_array()
	#6 /magento/vendor/magento/module-webapi/Controller/Rest.php(188): Magento\Webapi\Controller\Rest\SynchronousRequestProcessor->process()
	#7 /magento/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest->dispatch()
	#8 /magento/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\Interceptor->___callParent()
	#9 /magento/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\Interceptor->Magento\Framework\Interception\{closure}()
	#10 /magento/generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(23): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins()
	#11 /magento/vendor/magento/framework/App/Http.php(116): Magento\Webapi\Controller\Rest\Interceptor->dispatch()
	#12 /magento/generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http->launch()
	#13 /magento/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch()
	#14 /magento/pub/index.php(30): Magento\Framework\App\Bootstrap->run()
	#15 {main} [] []

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

Labels

Area: APIsIssue: needs updateAdditional information is require, waiting for responsePriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: dev in progressReported on 2.4.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions