Skip to content

Function: createResponseError()

ts
function createResponseError(code, options?): ResponseError;

Defined in: src/errors.ts:222

Build the right ResponseError (condition subclass when the code maps to one) for a server error response. Providers throw through this so condition semantics stay identical across software.

Parameters

ParameterType
codestring
options?ResponseErrorOptions

Returns

ResponseError