|
err = errors.New("render: unable to automatically decode the request content type") |
If the returned error are defined var, it would be possible to compare and know what exactly happened. The error message from render package cannot be directly to client in most cases, but application developer would like to return some custom error.
var (
ErrContentTypeNotSet = errors.New("render: missing content-type, unable to automatically decode the request content")
)
would be helpful.