Skip to content
View as Markdown
View as Markdown

@salesforce/b2c-tooling-sdk / clients / isOcapiDeprecatedFault

Function: isOcapiDeprecatedFault()

isOcapiDeprecatedFault(error): boolean

Defined in: packages/b2c-tooling-sdk/src/clients/error-utils.ts:69

Returns true if an API error object is an OCAPI deprecation fault (fault.type === 'OcapiDeprecatedException').

Detection keys off the structured fault.type, not the message text, so it is robust to message wording changes. Used to convert the opaque OCAPI 403 into actionable "configure SCAPI" guidance at every OCAPI-terminal site.

Parameters

error

unknown

Returns

boolean

Released under the Apache-2.0 License.