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(medusa): fix missing throw in the store cart create-payment-sessions #2568

Merged
merged 2 commits into from
Nov 9, 2022

Conversation

adrien2p
Copy link
Member

@adrien2p adrien2p commented Nov 9, 2022

What

The create payment sessions when getting an error was doing nothing with it. As pair the actual handling of those cases, I ve change the end point to re throw the error. The error will be then bubbled up to the error-handler which will manage to handle that error correctly

https://sentry.io/organizations/medusa-nc/issues/3729401711/?project=4504043043618816&query=transaction%3A%22POST+%2F%3Aid%2Fpayment-sessions%22&referrer=issue-stream

@changeset-bot
Copy link

changeset-bot bot commented Nov 9, 2022

🦋 Changeset detected

Latest commit: b262ffd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@medusajs/medusa Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@olivermrbl
Copy link
Contributor

Could this happen in other endpoints that use the work stages of the IdempotencyKeyService? If so, I think we should include them in the PR

@adrien2p
Copy link
Member Author

adrien2p commented Nov 9, 2022

@olivermrbl no there is not, I ve already check while doing that PR. The only thing to do with some of them would be a clean up as the try catch is not necessary but I did not want to expand the scope of that PR to also includes those clean up as it was not the purpose of it

@adrien2p adrien2p marked this pull request as ready for review November 9, 2022 15:37
@adrien2p adrien2p requested a review from a team as a code owner November 9, 2022 15:37
@olivermrbl
Copy link
Contributor

Got it 👍

Copy link
Contributor

@olivermrbl olivermrbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@olivermrbl olivermrbl merged commit 2d095a0 into develop Nov 9, 2022
@olivermrbl olivermrbl deleted the fix/cart-create-session-unhandled-error branch November 9, 2022 15:47
@github-actions github-actions bot mentioned this pull request Nov 9, 2022
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.

None yet

2 participants