getCommsErrorCode()
function getCommsErrorCode(error: unknown): number | null;
The numeric error_code the API sends in an error body, when there was one.
Parameters
| Parameter | Type | Description |
|---|---|---|
error | unknown | The thrown value to inspect. |
Returns
number | null
The code, or null when the error is not a
CommsRequestError or carried no numeric error_code.