REST API task_lines error

I’ve just tried to run a script to set up creating invoices.

POST /invoices with ‘task_lines’ consistently returns a ‘500 internal_error’, even with all required fields present (hourly_rate, hours, vat_rate, vat_amount, nominal_code), while the equivalent ‘item_lines’ request succeeds.
Am I right in thinking this error is not on my end?