[null, error]:
type SdkError = {
code: ErrorCode;
message: string;
// the http status, or null when the request never got an answer
status: number | null;
};
code | Status | Meaning |
|---|---|---|
bad_request | 400, 422 | The input was rejected. message says which field. |
unauthorized | 401 | The API key is missing, wrong or revoked. |
forbidden | 403 | The key may not do this. |
not_found | 404 | Nothing has that id. Send the contact with contacts.upsert first. |
conflict | 409 | The account belongs to another contact with its own dbId. |
limit_reached | 403 | The workspace’s plan has no room for another, such as a contact. |
rate_limited | 429 | Too many requests. Wait and retry. |
server_error | 5xx | Something failed on our side. Retrying is safe. |
network_error | — | The request never got an answer. Retrying is safe. |
contacts.upsert and events.add with an idempotencyKey are safe to retry on any error.