Graphorin API reference v0.10.1
Graphorin API reference / @graphorin/security / / readOAuthErrorFields
Function: readOAuthErrorFields()
ts
function readOAuthErrorFields(json): Promise<{
error?: string;
error_description?: string;
}>;Defined in: packages/security/src/oauth/errors.ts:110
Best-effort read of the RFC 6749/7591 error / error_description fields from a non-2xx OAuth JSON response. Never throws (a malformed or empty body yields {}), so the caller can still surface the HTTP status when the server returns no spec body (OAUTH-ADV-01/02).
Parameters
| Parameter | Type |
|---|---|
json | () => Promise<unknown> |
Returns
Promise<{ error?: string; error_description?: string; }>