-
-
Notifications
You must be signed in to change notification settings - Fork 863
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
Don't drop error context when adding a message to errors #1958
Conversation
asonix
commented
Nov 24, 2021
•
edited
Loading
edited
- Replace ApiError references with LemmyError directly
- Instrument implementations of Perform and PerformCrud with Tracing for more context in errors
- Instrument Feeds with Tracing
- Instrument apub with Tracing
- Respond to requests with LemmyError rather than turning all errors into BadRequest
- Default LemmyError to respond with Bad Request status code
- Stop logging new & closing spans
- Don't pretty-print logs
- Mark passwords, emails, jwts as "sensitive"
- Reduce the number of logged HTTP fields
- Update Actix Web & friends
For some reason the errors aren't propagating correctly as JSON. I tried a should-fail login for the front end, and it gets a JSON parsing error, and the back end shows this:
|
Its still logging stack traces for simple info logs. Could you change that so it only logs the message for info and below, and includes the stack trace only for warn/error? Its just way too verbose this way.
And HTTP request params are still logged twice. I think we could skip those completely, as params are already logged for each API call. Though for things which dont go through the API (eg RSS feeds or apub endpoints), it makes sense to log HTTP params. Not sure how complicated this would be though.
Also, some HTTP endpoints still return a stack trace on error, not sure if thats intended. Not really a problem imo but worth mentioning.
|
Instrument Perform implementations for more precise traces Use ApiError to format JSON errors when messages are present Keep SpanTrace output in LemmyError Display impl
02fbb38
to
ceba674
Compare