Class

MatrixError

MatrixError(body, statusCode)

Represents an HTTP error from the Matrix server.
Constructor

# new MatrixError(body, statusCode)

Creates a new Matrix Error
Parameters:
Name Type Description
body The error body.
statusCode The HTTP status code.

View Source models/MatrixError.ts, line 7

Classes

MatrixError
MatrixError

Members

# errcode

The Matrix error code

View Source models/MatrixError.ts, line 28

string

# errcode

The Matrix error code

View Source models/MatrixError.ts, line 87

# error

Optional human-readable error message.

View Source models/MatrixError.ts, line 32

string

# error

Optional human-readable error message.

View Source models/MatrixError.ts, line 93

# message

Developer-friendly error message.

View Source models/MatrixError.ts, line 66

# retryAfterMs

If rate limited, the time in milliseconds to wait before retrying the request

View Source models/MatrixError.ts, line 36

number

# retryAfterMs

If rate limited, the time in milliseconds to wait before retrying the request

View Source models/MatrixError.ts, line 99

Methods

# message()

Developer-friendly error message.

View Source models/MatrixError.ts, line 113

# static parseRetryAfterHeader(header) → {number}

Parse a Retry-After header into a number of milliseconds.
Parameters:
Name Type Description
header The value of a Retry-After header.
See:

View Source models/MatrixError.ts, line 81

If the date could not be parsed.
number