Earlier quoted context omitted.
I agree go’s error handling feels a bit clunky, though I prefer the local error handling and passing up the chain (if it were a bit more ergonomic) to exceptions, which IMO have a lot of other problems. The main problems seem to me to be boilerplate and error types being so simplistic (interface just has a method returning a string). Boilerplate definitely seems solvable and a proper error interface too. I tend to us…
In an HTTP server, top level means the handlers, is that so?
Depends if it can be handled lower (with a retry or default data for example), if it can be it won’t be passed all the way up.
Generally though I haven’t personally found it useful to always annotate at every point in the call chain. So my default is not to annotate and if err return err.
What I like about errors instead of exceptions is they are boring and predictable and in the call signature so I wouldn’t want to lose that.