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

Make sure that ErrorMessage is always interpreted as json in Response #405

Merged
merged 2 commits into from Jul 24, 2023

Conversation

trnguyencflt
Copy link
Member

@trnguyencflt trnguyencflt commented Jul 20, 2023

As title said, this makes sure that we explicitly specify application/json media type for ErrorMessage, otherwise, with Options request, it can return 500

@trnguyencflt trnguyencflt force-pushed the KREST-11086-fix-response-builder branch from d2a7094 to ee1a641 Compare July 20, 2023 14:39
@trnguyencflt trnguyencflt marked this pull request as ready for review July 20, 2023 14:39
@trnguyencflt trnguyencflt requested review from a team as code owners July 20, 2023 14:39
Integration to show that without explicit MediaType, Options requests can make server fails with 500
@trnguyencflt trnguyencflt force-pushed the KREST-11086-fix-response-builder branch from ee1a641 to 1f57603 Compare July 20, 2023 15:04
Copy link
Member

@msn-tldr msn-tldr left a comment

Choose a reason for hiding this comment

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

LGTM

@ehumber
Copy link
Member

ehumber commented Jul 21, 2023

Does WebApplicationExceptionMapper

need the same change?

@trnguyencflt
Copy link
Member Author

Does WebApplicationExceptionMapper

need the same change?

We don't need it here as it's already set in createResponse call above it.

@trnguyencflt trnguyencflt merged commit c32438d into master Jul 24, 2023
3 checks passed
@trnguyencflt trnguyencflt deleted the KREST-11086-fix-response-builder branch July 24, 2023 09:09
trnguyencflt added a commit that referenced this pull request Aug 7, 2023
trnguyencflt added a commit that referenced this pull request Aug 7, 2023
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