A general HTTP error.

Hierarchy

  • Error
    • HttpError

Constructors

  • Parameters

    • statusCode: number
    • statusMessage: string
    • Optionalbody: string
    • OptionalcontentType: string
    • Optionalheaders: HttpHeaders
    • Optionalmessage: string

    Returns HttpError

Properties

body?: string
code: string

application error code, when available

contentType?: string
headers?: HttpHeaders
json: any

json error response

message: string
name: string
stack?: string
statusCode: number
statusMessage: string
prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

Optional override for formatting stack traces

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void