Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Endpoints >

Error Message while processing request

Started by Nick Dorogavtsev -   in API Endpoints

Didn't change anything in our code but from 1st of Jul started getting various errors for attaching files and payments to Invoices:

Example from attachment:
An error occurred while processing your request.
Reference #169.a0f00117.1530673086.377d9ed

Example from payment:
An error occurred while processing your request.
Reference #169.a0f00117.1530673086.377da1a

Invoices created, no problems.
Official Xero Reply
Here are two options to try in the meantime:

1. We've had reports from people that are still using the XeroOAuth library that this line -> https://github.com/XeroAPI/XeroOAuth-PHP/blob/master/lib/XeroOAuth.php#L335 was causing a double Content-Length header to be set. The errors seen in https://aibk.com.au/test/query.txt match other Content-Length related errors we've seen in Akamai in the past week. If you comment out line 335 of that PHP library, does it change what you're getting back? (This would mean changing the POST back to a PUT request)

2. The content type header on the request seems to be defaulted or set to "text/html". If you set the content type to 'image/jpeg', does that change anything?

I'm trying to replicate the problem on our end without much luck at the moment. Let me know if either of these helps you.

We also deprecated the XeroOAuth PHP library recently, this is now the supported library for PHP https://github.com/calcinai/xero-php

Steven McDonald (Xero Staff)