Timeouts and retry options on AccountRight .NET SDK
Hi,
We are using AccountRight .NET SDK (v 2018.1.144) for our integration jobs where we insert/update records on MYOB company files (contacts, projects, invoices, claims etc.) with our client data and time to time we noticed the MYOB API calls failing internally with "500 Internal Server Error" which are due to communication/connection failures on MYOB API.
e.g. "(https://ar1.api.myob.com/accountright/d099d651-f49a-405e-9e10-5f0e2f3dd9d4/Purchase/Order/Service/?$filter= Number eq 'W185954') ---> System.Net.WebException: The remote server returned an error: (500) Internal Server Error."
Just wondering whether there are built in facilities on the SDK to apply a timeout and specially to go for a predefined number of retries before simply throwing the above exception ?
Thanks
Dinesh (Insula Group)
Hi Insulagroup , we have a similar situation with a 2-way integration that runs (mostly) unattended, and my comments are as follows:
- there is no 'retry' option within the SDK
- you will have to add that function to your app
- include x-myobapi-requestid=<guid> in your header (create your own guid)
- most 500 errors go through on the 2nd attempt, the worst I've ever seen (so far) is the 4th attempt
- we maintain a trace log of all API errors (including all the details required by the API team) as evidence we can forward to the developers if necessary.
The API team have been very helpful to date, there was a recent upgrade to the API infrastructure, but we still see these errors occasionally.