Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Serializer] Make ProblemNormalizer give details about ValidationFailedException and PartialDenormalizationException #49944

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

Merged
merged 1 commit into from
Apr 6, 2023

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Apr 5, 2023

Q A
Branch? 6.3
Bug fix? no
New feature? yes
Deprecations? no
Tickets -
License MIT
Doc PR -

This PR provides some infrastructure that I think is missing and would be nice using in #49138

With this patch, if an HttpException is thrown and if it wraps either a ValidationFailedException or a PartialDenormalizationException, Symfony will return a JSON containing the details of the validation failures / missing properties when the request comes with Accept: application/json.

I also fixed a few minor things that I found while digging the code on this topic.

@nicolas-grekas nicolas-grekas force-pushed the ser-errors branch 5 times, most recently from e82ef12 to 1dde120 Compare April 5, 2023 16:10
Copy link
Member

@lyrixx lyrixx left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏼

…ailedException` and `PartialDenormalizationException`
@yceruto
Copy link
Member

yceruto commented Apr 6, 2023

Great! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants