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

feat(errors): Convert missing_argument to not_found errors #462

Merged
merged 4 commits into from
Sep 19, 2022

Conversation

rsempe
Copy link
Collaborator

@rsempe rsempe commented Sep 15, 2022

Context

Error handling in services and the way it's rendered in API and GraphQL needs a complete refactoring.

Description

The objective of this PR is to return 404 not_found errors for existing 422 missing_argument failures.

Concerning GraphQL, it impacts CreateAppliedAddOn (when customer or add_on not found), CreateAppliedCoupon (when customer or coupon not found) and CreateSubscription (when customer or plan not found).

It has been validated that this change does not require updating the frontend, as it only triggers a generic error.

WIP
Need to update ErrorSerializer to render 404 Not Found for webhooks instead of 422.

@rsempe rsempe marked this pull request as draft September 15, 2022 13:36
@rsempe rsempe marked this pull request as ready for review September 16, 2022 15:32
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.

3 participants