fix: make "other" error actually transparent #51
Merged
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.
This PR fixes the Display trait for the "Other" error. Before, these errors would just output "Other errors which are not explicitly handled" for everything without any other context.
with this change, they output the full anyhow content.
e.g.: "data did not match any variant of untagged enum PersonOrGroup"
or: "Request error: error sending request for url (http://localhost:5313/u/Lady_Albedo_96): connection error: Connection reset by peer (os error 104)"
The reason for this issue was some bad interaction between the "displaydoc" library and the "thiserror" library. I tried a few other things to fix it but nothing except removing DisplayDoc worked.
This PR also adds a few random "context" calls that I needed while debugging something. They aren't great but imo the more anyhow context is used the better.