Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Endpoints >

Connection Reset Error

Started by Michael Pisula -   in API Endpoints

Hello -- This morning, when making a call like:

https://api.xero.com/api.xro/2.0/Invoices?Statuses=DRAFT%2CSUBMITTED%2CDELETED%2CAUTHORISED%2CPAID%2CVOIDED&page=7

I began getting connection reset errors like:

urllib3.exceptions.ProtocolError: ("Connection broken: ConnectionResetError(104, 'Connection reset by peer')", ConnectionResetError(104, 'Connection reset by peer'))

Is there any known connectivity issues?
Hello Xero Team. Any update here?
 

Michael Pisula  

I am having the same issue with calls to the NZ Payroll endpoint. Connections are just being closed. Also existing refresh tokens were cancelled
 

Lachlan Cahill  

Xero replied to a case of mine saying that they don't see a problem and pointed me to stackoverflow to look for solutions. So I had to build retries into my code, which solved the problem for me.
 

Michael Pisula  

I can confirm that there is in fact an issue. We have had code running successfully for months now, and only now are we experiencing these same exceptions. No change has been made to the source code, and the connection is being closed by Xero. This requires urgent attention.
 

Lachlan Cahill  

I don't know if Xero monitors this community, but I got no help from them regarding this. My code was similarly untouched for months when this started happening.
 

Michael Pisula  

Hi, we also have code that was working fine and suddenly started giving us this error the last couple of weeks. If putting in retries has helped you, can you link to a way of doing this?
 

Marilie La Grange  

Hi all,

My issue was not resolved by retries, rather it seems xero's back end is more fussy about the type of request you send. From memory, i was sending a post request, but this endpoint was expecting a get request. It is worth looking at the type of request you are sending, then cross checking with the documentation.
 

Lachlan Cahill