Skip to main content

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#

NameType
errorunknown

Returns#

Object

an error object containing appropriate status code and an {@link ErrorBody}

NameType
bodyErrorBody
codenumber

Defined in#

src/http_errors.ts:21