OPDC API error code

SAGE_DUPLICATE_KEY

HTTP status 409

The record already exists in Sage: Msg 2627 (a PRIMARY KEY or UNIQUE constraint) or Msg 2601 (a unique index). 409, and permanent.

Distinct from DUPLICATE_TRANSACTION, which is specifically a transaction number already posted as a ledger transaction. This one is any other key collision, including one on a record number or a natural key.

The API answers with a problem document (RFC 9457) whose type is https://twinn.engineering/errors/sage-duplicate-key, and with X-Error-Code: SAGE_DUPLICATE_KEY. Branch on the code, never on the detail text.

How errors work, and what to retryEvery error code