Class: WWWAuthenticateChallengeError

March 19, 2026 Ā· View on GitHub

šŸ’— Help the project

Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by becoming a sponsor.


Thrown when a server responds with a parseable WWW-Authenticate challenges, typically because of expired tokens, or bad client authentication

Example

HTTP/1.1 401 Unauthorized
WWW-Authenticate: Bearer error="invalid_token", error_description="The access token expired"

Properties

cause

• cause: WWWAuthenticateChallenge[]

The parsed WWW-Authenticate HTTP Header challenges


code

• code: "OAUTH_WWW_AUTHENTICATE_CHALLENGE"


message

• message: string


name

• name: string


response

• response: Response

The Response that included a WWW-Authenticate HTTP Header challenges, its Response.bodyUsed is false


status

• status: number

HTTP Status Code of the response


stack?

• optional stack?: string