OPDC API error code

INVOICE_STATUS_NOT_ALLOWED

HTTP status 422

A new AP invoice at a status it cannot be entered at. 422.

A new invoice is entered Open (1), for Review (2) or in Dispute (3), and all three post to the general ledger. Paid (4) and Void (5) are set when the invoice is paid or voided. Nothing is written.

The API answers with a problem document (RFC 9457) whose type is https://twinn.engineering/errors/invoice-status-not-allowed, and with X-Error-Code: INVOICE_STATUS_NOT_ALLOWED. Branch on the code, never on the detail text.

How errors work, and what to retryEvery error code