Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Handle errors on placeOrder mutations #2799

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

pmzandbergen
Copy link
Contributor

@pmzandbergen pmzandbergen commented Nov 13, 2024

Description
The PlaceOrder resolver does not necessary return an order, in case of errors. See https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/QuoteGraphQl/Model/Resolver/PlaceOrder.php#L106

Tested scenarios

  • Create a Cart which can not create an order (missing shipping info, no stock, etc.)
  • Place the order, with this PR those should be returned correctly (otherwise a PHP error will be thrown due to the undefined array key)

Fixes #2622

@pmzandbergen
Copy link
Contributor Author

Fixes #2622

@candemiralp
Copy link
Member

Hello @pmzandbergen,

Thank you for your contribution. We will merge and release this PR after completing the reviews.

Best Regards,
Can

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ECP-9229] Undefined array key "order" in Plugin/GraphQlPlaceOrderAddCartId.php on line 63
2 participants