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

MODPATRON-156 Validation errors should return 422 #142

Merged
merged 8 commits into from
Jun 21, 2024

Conversation

roman-barannyk
Copy link
Contributor

Purpose

When mod-patron fails to create a request because circulation rules don't allow it, it returns 500 error code with plain text body (screenshot in the attachment). On production, 500 errors' messages get replaced with a standard message which hides this information from the user.

When validation errors happen, mod-patron should return 422 code with JSON body, formatted in the same way as other errors in FOLIO (errors.schema)

Resolves: MODPATRON-156

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
77.4% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@roman-barannyk roman-barannyk merged commit d5db4e5 into master Jun 21, 2024
5 of 6 checks passed
@roman-barannyk roman-barannyk deleted the MODPATRON-156 branch June 21, 2024 19:29
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