NewHTTPError creates a new HTTPError with the given status code and message.
(statusCode int, msg string)
| 34 | |
| 35 | // NewHTTPError creates a new HTTPError with the given status code and message. |
| 36 | func NewHTTPError(statusCode int, msg string) *HTTPError { |
| 37 | return &HTTPError{ |
| 38 | StatusCode: statusCode, |
| 39 | Msg: msg, |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | // SetInternal sets the internal error for the HTTPError. |
| 44 | func (e *HTTPError) SetInternal(err error) *HTTPError { |
no outgoing calls