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

update some debug message behavior #4492

Merged
merged 3 commits into from Mar 23, 2022
Merged

update some debug message behavior #4492

merged 3 commits into from Mar 23, 2022

Conversation

davidism
Copy link
Member

  • Don't intercept routing redirects if the code hasn't been changed from 308 (or 307). The message about not preserving the request method and body is not relevant for the modern status code. Also edited the message a bit, although it shouldn't be seen anymore.
  • When files raises a DebugFilesKeyError, it looks like the original error rather than a chained exception.
  • on_json_loading_failed tries to return the super() implementation first, then reraises any error in debug mode.

I originally started working on this due to pallets/werkzeug#2355, because I thought it might be better to not suppress JSON errors outside debug mode. 400 errors indicate a problem with client data, so it seems ok to show what that problem was. I've stopped short of doing that for this release, but want to revisit suppressing information in 400 errors later.

These don't change the request body, so the debug error is no longer relevant.
@davidism davidism added this to the 2.1.0 milestone Mar 23, 2022
@davidism davidism merged commit ce7b884 into main Mar 23, 2022
@davidism davidism deleted the debug-messages branch March 23, 2022 16:18
@davidism
Copy link
Member Author

davidism commented Mar 23, 2022

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant