bugfix: fatal errors do not keep underlying error#5363
Conversation
There was a problem hiding this comment.
The change itself looks fine. However, while looking for cases that could regress by merging this PR, I've stumbled on the following pattern: errors.Fatal(err.Error()). This prevents this PR from working in somewhat random places and thus has to be replaced with errors.Fatalf("%s", err). Except for this exact pattern, I haven't found any places that use errors.Fatal in a creative way.
4ba82c3 to
5b56087
Compare
I have updated the code changes for the same. Please review at your leisure. |
|
Hi @MichaelEischer, bubbling this PR up since I see you are reviewing some PRs. |
* replace all occurences of `errors.Fatal(err.Error())` with `errors.Fatalf("%s", err)` so that the error wrapping is correct across the codebase
* updated the review comments
5b56087 to
ce089f7
Compare
|
I found a few more creative usages after merging this PR: #5528 |
What does this PR change? What problem does it solve?
Unwrapmethod to helperrors.Isanderrors.Ascomparisons.fatalerror preserves the underlying errorsWas the change previously discussed in an issue or on the forum?
Closes #5258
Checklist
changelog/unreleased/that describes the changes for our users (see template).