5 ms·
As I said in the article, the example is simplified. As you point out, incorporating the HTTP code into the error and using errors.As is much better way of doin
by lzap 4y ago
As I said in the article, the example is simplified. As you point out, incorporating the HTTP code into the error and using errors.As is much better way of doing that:
"Obviously, the common HTTP status codes could easily be a new error type (based on int type) so the actual code could be easily extracted via errors.As, but I want to keep the example simple."