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(ct): handle error from ct create order from cart request #6538

Merged
merged 3 commits into from
Jan 17, 2022

Conversation

CheStas
Copy link
Contributor

@CheStas CheStas commented Nov 29, 2021

handle error after createMyOrderFromCart request.

Description

If commercetools api returns an error after createMyOrderFromCart request, the request is successful but the response doesn't have order field and has errors field. Instead of graphQLErrors message, we observe useMakeOrder.make Cannot read property 'order' of undefined error message

Related Issue

#6536

Motivation and Context

instead of useful error message we observe useMakeOrder.make Cannot read property 'order' of undefined

How Has This Been Tested?

need help to test and verify it works ok.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have read the CONTRIBUTING document.

Changelog

  • I have updated the Changelog (V1) v2 and mentioned all breaking changes in the public API.
  • I have documented all new public APIs and made changes to existing docs mentioning the parts I've changed so they're up to date.

Tests

  • I have written test cases for my code
  • I have tested my Pull Request on production build and (to my knowledge) it works without any issues
  • I have added tests to cover my changes.
  • All new and existing tests passed.

I tested manually my code, and it works well with both:

  • Default Theme
  • Capybara Theme

Code standards

  • My code follows the code style of this project.

Docs

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@CheStas
Copy link
Contributor Author

CheStas commented Nov 30, 2021

that's how the issue looks on the demo page. also, look at the response. the response type doesn't match with what we expect

image

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@dawid-ziobro dawid-ziobro merged commit 1ee759c into vuestorefront:main Jan 17, 2022
dawid-ziobro pushed a commit that referenced this pull request Jan 17, 2022
* fix(ct): handle error from ct create order from cart request
dawid-ziobro added a commit that referenced this pull request Jan 17, 2022
…6612)

* fix(ct): handle error from ct create order from cart request
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.

4 participants