Skip to main content

http_errors

Api Code Documentation / Exports / http_errors

Table of contents

Functions

Functions

toHttpError

toHttpError(error, version?): Object

Converts an error object to an appropriate http error

Parameters

NameTypeDefault value
errorunknownundefined
versionstring"1.0"

Returns

Object

an error object containing appropriate status code and an ErrorBody

NameType
bodyErrorBody
codenumber

Defined in

src/http_errors.ts:22