@salesforce/b2c-tooling-sdk / clients / isInvalidScopeError
Function: isInvalidScopeError()
isInvalidScopeError(
error):boolean
Defined in: packages/b2c-tooling-sdk/src/clients/scapi-backend-utils.ts:84
Detects an Account Manager invalid_scope error.
When a client's API client doesn't have the requested scope configured, Account Manager returns {"error":"invalid_scope", ...} on the token request. The OAuth strategy surfaces that as an Error whose message contains invalid_scope.
Used by fallback wrappers to decide whether to downgrade to OCAPI.
Parameters
error
unknown
Returns
boolean