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

Improve error message for StreamReadConstraints violations #1007

Closed
cowtowncoder opened this issue Apr 30, 2023 · 0 comments
Closed

Improve error message for StreamReadConstraints violations #1007

cowtowncoder opened this issue Apr 30, 2023 · 0 comments
Labels
2.16 Issue planned (at earliest) for 2.16
Milestone

Comments

@cowtowncoder
Copy link
Member

cowtowncoder commented Apr 30, 2023

Currently (as of 2.15.0), violation of StreamReadConstraints is indicated by message like:

String length (50000001) exceeds the maximum length (5000000)

which does not much indication as to where the setting might be defined or changeable.
Let's add some more information; for example:

String value length (50000001) exceeds the maximum length (5000000 from `StreamReadConstraints.getMaxStringLength()`)

NOTE: not adding in 2.15.1 since Exception messages are part of API and while this seems generally useful I want to avoid potential breakage in patch release. But at the same time it's a minor change so do not think it requires waiting for major version (since timing of 3.0 is still unclear).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.16 Issue planned (at earliest) for 2.16
Projects
None yet
Development

No branches or pull requests

1 participant