Skip to content
This repository was archived by the owner on Sep 26, 2024. It is now read-only.

Our changes to the fork force printing of stack for all errors, can we undo this? #15

Answered by bewuethr
coldfgirl asked this question in Q&A
Discussion options

You must be logged in to vote

I am in favour of this, and to go further, I think the stack trace is noise 95% of the time and I wish I had a carefully wrapped error instead. I'm really not interested in half a dozen middleware stack frames.

Since Go 1.13, the stdlib error package provides the %w formatting directive, and with Is, As, and Unwrap, we have all we need. This would require re-thinking (or starting to think) about things like when to wrap, be more careful about logging only after bubbling up etc., but I think it would potentially make errors much more useful.

If we switch to stlib errors, the migration is also quite easy: we can just start using it, and migrate existing services over slowly, as it's a diffe…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@coldfgirl
Comment options

coldfgirl Aug 15, 2022
Collaborator Author

@bewuethr
Comment options

@bewuethr
Comment options

@coldfgirl
Comment options

coldfgirl Aug 15, 2022
Collaborator Author

@coldfgirl
Comment options

coldfgirl Sep 16, 2022
Collaborator Author

Answer selected by coldfgirl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants