Error creates a new HTTP error with a status code from an existing error.
(statusCode int, err error)
| 20 | |
| 21 | // Error creates a new HTTP error with a status code from an existing error. |
| 22 | func Error(statusCode int, err error) error { |
| 23 | return HTTPError{ |
| 24 | StatusCode: statusCode, |
| 25 | Err: err, |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | // Errorf creates a new HTTP error with a status code and formatted message message. |
| 30 | func Errorf(statusCode int, format string, args ...interface{}) error { |
no outgoing calls
no test coverage detected