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

LNK-1524: fix validation error #688

Merged
merged 3 commits into from
Feb 1, 2024

Conversation

arianamihailescu
Copy link
Contributor

No description provided.

Copy link
Contributor

@smailliwcs smailliwcs left a comment

Choose a reason for hiding this comment

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

I don't think we want to map all DataFormatExceptions to 400s, since it's possible they'll be produced outside of request binding. Better strategy might be to wrap the body of FhirJsonDeserializer.deserialize in a try block and map all exceptions thrown there (not just DataFormatException, but any arbitrary Exception) to a ResponseStatusException with HttpStatus.BAD_REQUEST.

Copy link
Contributor

@smailliwcs smailliwcs left a comment

Choose a reason for hiding this comment

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

Looks good, but see comment for potential tweak.

@arianamihailescu arianamihailescu merged commit 53c804f into development Feb 1, 2024
2 of 3 checks passed
@smailliwcs smailliwcs deleted the LNK-1524-validation-error branch March 21, 2024 13:34
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

3 participants