error.code, not on the message.
Every error has this shape:
{
"error": {
"code": "string",
"message": "string",
"details": {}
}
}
| Field | Type | Description |
|---|---|---|
error.code | string | Stable, machine-readable: UNAUTHORIZED, FORBIDDEN, NOT_FOUND, VALIDATION_FAILED, DUPLICATE_LEAD, RATE_LIMITED… |
error.message | string | A sentence for people. |
error.details (optional) | object | For VALIDATION_FAILED, fields maps each field key to its problem. |