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

Missing error information when deserializing #6889

Open
KDederichs opened this issue Dec 29, 2024 · 0 comments
Open

Missing error information when deserializing #6889

KDederichs opened this issue Dec 29, 2024 · 0 comments

Comments

@KDederichs
Copy link
Contributor

API Platform version(s) affected: 4.0.12

Description
In the AbstractItemNormalizer the exception thrown by the Serializer is caught and wrapped into a new exception with The input data is misformatted. as text, obscuring any hint to what the original problem is.

How to reproduce
Try denormalizing something as int when sending it a string or something

Possible Solution
Expose the original serializer error message as well, at least in the development version

Additional Context
In my case it was obscuring this:
The type of the \"votingPower\" attribute for class \"App\\Dto\\PollVoteConfigDto\" must be one of \"int\", \"null\" (\"string\" given). which is infinitely more useful than The input data is misformatted.

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

No branches or pull requests

1 participant