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

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

# Type Alias: OcapiError

> **OcapiError** = `components`\[`"schemas"`\]\[`"fault"`\]

Defined in: [packages/b2c-tooling-sdk/src/clients/ocapi.ts:79](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/e7c16f1ae423da0aa47b3e10be88f9770b53619b/packages/b2c-tooling-sdk/src/clients/ocapi.ts#L79)

OCAPI error/fault response type from the generated schema.

## Example

```typescript
const { data, error } = await client.DELETE('/code_versions/{code_version_id}', {
  params: { path: { code_version_id: 'v1' } }
});
if (error) {
  // Access the structured error message
  console.error(error.fault?.message);
  // e.g., "Code version 'v1' was not found"
}
```
