Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > Getting Started >

Status OK replaces HasErrors !!! when did this happen

Started by David Pearce -   in Getting Started

My Solution that had been working for two years suddenly stopped today and my 22 XERO API clients using the solution just lost a days work.

So when we originally coded we looked for "HasErrors":false in the lasterrormessage returning from the XERO API.

After a few hours of killing myself it appears that 31st July 2019 this disappeared from the XERO response.

I think it has been replaced with "Status":"OK" in the JSON object.

This maybe my fault, but what worries me is that searching after the event I still cant find a document showing the API update that I have missed, which killed my business for a day.

David
Hi David

It looks like this is related to a release made yesterday. Our team are currently working on a fix.

Sorry for the inconvenience, we'll post on this thread as we get any updates.

Regards

Robin
 

Robin Blackstone (Community Manager)  

Hi Robin, thanks for the reply.
Firstly is the Status:"OK" the equivalen?
Secondly, if so can you leave them both in for a few weeks. I have just changed 4 solutions, and about 32 references to "HasErrors":false to "Status":"OK".
I guess I could work tomorrow to add an or clause in.
Just dont want it to break again the other way around.
If you could keep me informed or let me know what time GMT the fix is going to take place if it has to switch back.

Thanks

David
 

David Pearce  

Hi David

Our developers have released a fix for missing "HasErrors" element from the JSON response.
 

Welli Abdullah (Xero Staff)  

Yes!!! I know what if feels like. We do calls to 3 xero tenants! It completely screwed our workflows as well.

Looks like it is working both ways now.

I guess the lesson maybe that we can rely on the http response code 200 instead of the Jason object.

I coded this 3 years ago so maybe was s but naive.

Can someone from Xero confirm that the http 200 is a better method to discuss success than using the haserrors or status. And 400 or whatever it is for failed calls?
 

David Pearce