OPDC API error code

EQUIPMENT_COST_INVALID

HTTP status 422

An AP invoice line names equipmentNumber but cannot be costed to it: it has no accountNumber, its account is not an equipment expense account, it has no costCode, no cost type can be found for it, or the equipment is inactive. 422.

The detail names each line. Equipment that does not exist is RECORD_NOT_FOUND. Nothing is written.

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

How errors work, and what to retryEvery error code