EncodeError encodes an Error. If the error is not a StatusCoder, the http.StatusInternalServerError will be used.
(err error)
| 51 | |
| 52 | // EncodeError encodes an Error. If the error is not a StatusCoder, the http.StatusInternalServerError will be used. |
| 53 | func (s *ResponseEncoder) EncodeError(err error) { |
| 54 | encode(s.w, err, http.StatusInternalServerError) |
| 55 | } |
| 56 | |
| 57 | // EncodeResponse encodes an response value. |
| 58 | // If the response is not a StatusCoder, the http.StatusInternalServerError will be used. |