3 ms·
In an HTTP server, top level means the handlers, is that so?
by rednafi 7mo ago
In an HTTP server, top level means the handlers, is that so?
- grey-area 7mo agoYes I guess I do annotation in two places - initial error deep in libraries is annotated, this is passed back up to the initial handlers who log and respond and decide what to show users. Obviously that’s just a rule of thumb and doesn’t always apply. 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.