matrix-js-sdk
    Preparing search index...

    Class OAuth2HTTPError

    An error thrown when a request to an OAuth 2.0 endpoint fails with a body matching the error response format specified in RFC 6749 section 5.2.

    Hierarchy (View Summary)

    Implements

    Index
    error: string

    RFC 6749 section 5.2 error code, e.g. invalid_grant

    IANA matains a registry of valid values at https://www.iana.org/assignments/oauth-parameters/oauth-parameters.xhtml#extensions-error

    error_description?: string

    RFC 6749 section 5.2 human-readable ASCII text providing additional information about the error. This field is optional and may be omitted by the endpoint.

    error_uri?: string

    RFC 6749 section 5.2 URI identifying a human-readable web page with information about the error. This field is optional and may be omitted by the endpoint.

    httpHeaders?: Headers
    httpStatus?: number
    • Returns number | null

      The recommended delay in milliseconds to wait before retrying the request that triggered this error, or null if no delay is recommended.

      Error if the recommended delay is an invalid value.

      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.

      Returns boolean

      Whether this error is due to rate-limiting.