Class MatrixError

Construct a generic HTTP error. This is a JavaScript Error with additional information specific to HTTP responses.

Param: msg

The error message to include.

Param: httpStatus

The HTTP response status code.

Hierarchy (view full)

Constructors

  • Construct a Matrix error. This is a JavaScript Error with additional information specific to the standard Matrix error response.

    Parameters

    • errorJson: IErrorJson = {}

      The Matrix error JSON returned from the homeserver.

    • Optional httpStatus: number

      The numeric HTTP status code given

    • Optional url: string
    • Optional event: MatrixEvent

    Returns MatrixError

Properties

errcode?: string
event?: MatrixEvent
httpStatus?: number

The numeric HTTP status code given

url?: string

Generated using TypeDoc