(message: string, statusCode: number)
| 23 | * Creates an Error with a statusCode property |
| 24 | */ |
| 25 | export function createHttpError(message: string, statusCode: number): HttpError { |
| 26 | const error = new Error(message) as HttpError |
| 27 | error.statusCode = statusCode |
| 28 | return error |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * Creates an authentication error (401) |
no outgoing calls
no test coverage detected