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

[@salesforce/b2c-tooling-sdk](../../modules.md) / [scapi](../index.md) / scapiErrorCode

# Function: scapiErrorCode()

> **scapiErrorCode**(`message`): `string` \| `undefined`

Defined in: [packages/b2c-tooling-sdk/src/scapi/errors.ts:41](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/d7ff38c7ca2b1411cd718b9554500c9416f00266/packages/b2c-tooling-sdk/src/scapi/errors.ts#L41)

The `SCAPI_*` code at the start of a message, if any.

## Parameters

### message

`string`

## Returns

`string` \| `undefined`
