Belin.io Core
    Preparing search index...

    Class Error

    An object thrown when an HTTP error occurs.

    Hierarchy

    • Error
      • Error
    Index

    Constructors

    • Creates a new HTTP error.

      Parameters

      • response: Response

        The server response.

      Returns Error

    Properties

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

    Optional override for formatting stack traces

    stackTraceLimit: number

    Accessors

    • get cause(): Response

      The server response.

      Returns Response

    • get isClientError(): boolean

      Value indicating whether the response's status code is between 400 and 499.

      Returns boolean

    • get isServerError(): boolean

      Value indicating whether the response's status code is between 500 and 599.

      Returns boolean

    • get validationErrors(): Promise<Map<string, string>>

      The validation errors.

      Returns Promise<Map<string, string>>

    Methods

    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void