@salesforce/b2c-tooling-sdk / clients / OcapiError
Type Alias: OcapiError
OcapiError =
components["schemas"]["fault"]
Defined in: packages/b2c-tooling-sdk/src/clients/ocapi.ts:56
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"
}