OPDC API error code

DAILY_PAYROLL_LINE_INVALID

HTTP status 422

A daily payroll line Sage would refuse to save. 422.

The detail names the line and the rule, in Sage's words: for example hours on a per diem pay type, a job or equipment with no cost code, a job and repaired equipment on one line, or no workers' compensation code after the defaults. Nothing is written.

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

How errors work, and what to retryEvery error code