-
Notifications
You must be signed in to change notification settings - Fork 512
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
✨ Handle NotFound and UnprocessableEntity errors in middleware #3327
✨ Handle NotFound and UnprocessableEntity errors in middleware #3327
Conversation
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
…ception Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Can we increase this threshold to something more pragmatic? 10-20% would make sense |
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
Signed-off-by: ff137 <[email protected]>
We can, but it's a bit of an annoying process because none of the maintainers have admin rights on the sonarcloud project right now. There is ways to set setting in the sonar-project.properties file and the github action but I haven't experimented much with this. For now I think we'll just have to comment when you think something should be ignored, but I would like to clean some of these reports up in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Signed-off-by: ff137 <[email protected]>
Quality Gate passedIssues Measures |
Closes #3322
Currently, NotFound and UnprocessableEntity errors would print stack traces in the logs. It is more sensible to record these as info logs, since they typically represent bad requests / client errors.
This PR contributes changes so that the new behaviour will print messages like:
A util method
extract_validation_error_message
was added to help print this marshmallow validation error, so that the logs still provide the error context previously contained in the stack trace.🎨 Other minor amendments included as well:
"Note: setting ledger to read-only mode"
). I opted to set these to warning levelready_middleware
to reduce complexity