OPDC API error code

SUBACCOUNT_REQUIRED

HTTP status 422

A line on an account that tracks subaccounts or departments, sent with no subaccount, or with one that does not belong to that account. 422.

The detail names every failing line, its account and its amount, and nothing is posted. There is no default subaccount: send the one the line belongs to.

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

How errors work, and what to retryEvery error code