Errorf creates a new HTTP error with a status code and formatted message message.
(statusCode int, format string, args ...interface{})
| 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 { |
| 31 | return HTTPError{ |
| 32 | StatusCode: statusCode, |
| 33 | Err: fmt.Errorf(format, args...), |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | // HTTPError represents an error with a HTTP status code. |
| 38 | type HTTPError struct { |
no test coverage detected