Improve errors / debugging by not stripping, log trace if requested #3425
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Right now one of the huge issues lemmy has is that the error reporting is very bad. Tons of people are reporting random issues and it's hard to diagnose anything. For example:
This error looks like there was a parsing error in when parsing some incoming message community right? False, the parsing error actually appears because after parsing a comment it tries to fetch the parent post, and the remote server response responded with a 404 error to that parent post request. You can't even tell the issue is with comment receiving here.
This change makes error reporting better by
strip lemmy_server
if someone cares about binary size.After this change, the above error can look like this (with some anyhow contexts added, not part of this PR):
and with RUST_BACKTRACE=1 and without further changes it looks like this (a bit noisy, but at least you can understand what happened since you can clearly see
CreateOrUpdateNote
,get_parents
, anddereference_from_http
in the backtrace: