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(customer): Catch ActiveRecord::RecordNotUnique when creating with API #2905

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

vincent-pochet
Copy link
Collaborator

@vincent-pochet vincent-pochet commented Dec 3, 2024

Description

This PR makes sure that ActiveRecord::RecordNotUnique are catched correctly when calling POST /api/v1/customers API endpoint and respond with a proper HTTP 422 rather than with today's HTTP 500

Sidenote: It also removes pp from some spec files

@vincent-pochet vincent-pochet merged commit ffb60c8 into main Dec 3, 2024
6 checks passed
@vincent-pochet vincent-pochet deleted the fix-catch-customer-duplicates branch December 3, 2024 10:48
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.

2 participants