NewHTTPError creates an HTTPError with an http status code and a message. Use HTTPErrorf for printf style messages.
(status int, message string)
| 109 | |
| 110 | // NewHTTPError creates an HTTPError with an http status code and a message. Use HTTPErrorf for printf style messages. |
| 111 | func NewHTTPError(status int, message string) *HTTPError { |
| 112 | return &HTTPError{status, message} |
| 113 | } |
| 114 | |
| 115 | // Attempts to map an error to an HTTP status code and message. |
| 116 | // Defaults to 500 if it doesn't recognize the error. Returns 200 for a nil error. |
no outgoing calls
no test coverage detected