http_errors
Api Code Documentation / Exports / http_errors
Table of contents
Functions
Functions
toHttpError
▸ toHttpError(error
): Object
Converts an error object to an appropriate http error
Parameters
Name | Type |
---|---|
error | unknown |
Returns
Object
an error object containing appropriate status code and an ErrorBody
Name | Type |
---|---|
body | ErrorBody |
code | number |