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

[Bug]: some commands used by useCart composable does not return error object #1393

Open
1 task done
bartoszherba opened this issue Nov 15, 2022 · 0 comments
Open
1 task done
Labels
bug Something isn't working triage-needed Issues that need to be checked

Comments

@bartoszherba
Copy link
Collaborator

bartoszherba commented Nov 15, 2022

Expected Behavior

All commands executing graphql requests should (if applicable) return errors so the application can handle it.

Actual Behavior

Some commands eg. removeItemCommand do not return error data in the response.

Possible Solution

Update returning data structure to include the error object and handle it in the composable.
Broken commands are:

  • updateItemQtyCommand
  • removeItemCommand
  • loadTotalQtyCommand (this might require a bigger change and maybe should be excluded from this list)
  • some actions in loadCartCommand

Example implementation can be found in the applyCouponCommand

Steps to reproduce

No response

What version of Magento 2 integration are you using?

  • any

What version of Node.js are you using?

  • any

What browser (and version) are you using?

  • any

What operating system (and version) are you using?

  • any

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@bartoszherba bartoszherba added bug Something isn't working triage-needed Issues that need to be checked labels Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage-needed Issues that need to be checked
Projects
None yet
Development

No branches or pull requests

1 participant