3 ms·
Returning errors from a http handler is not a good idea imho. Because http errors/responses can be too complex for the limited Golang error objects. You usual
by LordHeini 4y ago
Returning errors from a http handler is not a good idea imho.
Because http errors/responses can be too complex for the limited Golang error objects.
You usually want an appropriate error code, a body with a message or set some header.