Construct a Matrix error. This is a JavaScript Error with additional information specific to the standard Matrix error response.
The Matrix error JSON returned from the homeserver.
Optional
httpStatus: numberThe numeric HTTP status code given
Optional
url: stringOptional
event: MatrixEventOptional
httpHeaders: HeadersThe HTTP response headers given
Optional
Readonly
errcodeOptional
eventOptional
Readonly
httpOptional
Readonly
httpOptional
urlThe recommended delay in milliseconds to wait before retrying the request that triggered this error, or null if no delay is recommended.
safeGetRetryAfterMs for a version of this check that doesn't throw.
Check if this error was due to rate-limiting on the server side (and should therefore be retried after a delay).
If this returns true
, getRetryAfterMs can be called to retrieve the server-side
recommendation for the retry period.
Whether this error is due to rate-limiting.
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.
Param: httpHeaders
The HTTP response headers.