---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../modules.md) / [clients](../index.md) / isOcapiDeprecatedFault

# Function: isOcapiDeprecatedFault()

> **isOcapiDeprecatedFault**(`error`): `boolean`

Defined in: [packages/b2c-tooling-sdk/src/clients/error-utils.ts:69](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/clients/error-utils.ts#L69)

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`
