A generic Ably error object that contains an Ably-specific status code, and a generic status code. Errors returned from the Ably server are compatible with the ErrorInfo structure and should result in errors that inherit from ErrorInfo.

Hierarchy

Constructors

  • Construct an ErrorInfo object.

    Parameters

    • message: string

      A string describing the error.

    • code: number

      Ably error code.

    • statusCode: number

      HTTP Status Code corresponding to this error.

    • Optional cause: string | Types.ErrorInfo | Error

      The underlying cause of the error.

    Returns ErrorInfo

Properties

cause?: string | Types.ErrorInfo | Error

The underlying cause of the error, where applicable.

code: number

Ably error code.

message: string

Additional message information, where available.

name: string
stack?: string
statusCode: number

HTTP Status Code corresponding to this error, where applicable.

prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Type declaration

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc