Skip to content

httpErrors

httpErrors(statusCode?, options?): Error

Defined in: utils/http-errors.js:51

number = 500

HTTP status code

RFC 9457 Problem Details fields

string = message

RFC 9457 detail (human-readable explanation)

[string, string][]

Response headers to attach

string

RFC 9457 instance URI identifying the specific occurrence

string

Alias for detail (backward compat)

Error

Underlying error

string | number

Retry-After value (seconds or HTTP-date). Auto-appended to headers as ['Retry-After', String(value)] and included in toJSON().

string = ...

RFC 9457 type URI (defaults to MDN docs link)

Error

  • Error with RFC 9457 properties and toJSON() method