Skip to content

Latest commit

 

History

History
70 lines (40 loc) · 1.57 KB

File metadata and controls

70 lines (40 loc) · 1.57 KB

Class: ResponseBodyError

💗 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 returns an OAuth-style error in a JSON response body.

Example

HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Cache-Control: no-store
Pragma: no-cache

{
  "error": "invalid_request"
}

Properties

cause

• cause: Record<string, JsonValue | undefined>

The parsed JSON response body


code

• code: "OAUTH_RESPONSE_BODY_ERROR"


error

• error: string

Error code given in the JSON response


response

• response: Response

The "OAuth-style" error Response, its Response.bodyUsed is true and the JSON body is available in ResponseBodyError.cause


status

• status: number

HTTP Status Code of the response


error_description?

• optional error_description?: string

Human-readable text providing additional information, used to assist the developer in understanding the error that occurred, given in the JSON response