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.

A ledger transaction line on an equipment cost account is refused with this code too: such a line posts only with equipment costs equal to it, which a ledger transaction cannot carry.

The API answers with a problem document (RFC 9457) whose type is https://twinn.engineering/developers/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