Timeouts and retry options on AccountRight .NET SDK

This thread is now closed to new comments.
Some of the links and information provided in this thread may no longer be available or relevant.
If you have a question please start a new post.
Insulagroup
Partner
4 Posts
Partner

4Posts

0Kudos

0Solutions

Solved: Go to Solution

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/?$... 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)

4 REPLIES 4
HelenB
MYOB Moderator
326 Posts
MYOB Moderator
MYOB Moderator

326Posts

227Kudos

67Solutions

Re: Timeouts and retry options on AccountRight .NET SDK

Hi @Insulagroup 

 

Thanks for reaching out. Firstly I've noticed that you are using an old verison of the .NET SDK. We recommend that you upgrade to the latest which is 2020.209.0-rc1. This is available to download from the NuGet Gallery here.

 

As for the 500 errors that you are receving, we recommend that you capture the request_id and then send it through to the API Support Team with the timestamp of when the request occured. The API Support Team will be able to provide more details on the 500 error's that you are seeing.

To capture the request_id using the .NET SDK, check out this link Here. Then you can log a ticket with the API Support Team by using this Link Here

 


Thanks,
@HelenB


MYOB API Team Leader


MYOB API Support Centre|MYOB App Marketplace|MYOB AccountRight API Endpoint Doc's



Did my answer help?


Mark it as a Solution

Insulagroup
Partner
4 Posts
Partner

4Posts

0Kudos

0Solutions

Re: Timeouts and retry options on AccountRight .NET SDK

Hi @HelenB ,

 

Thanks for your prompt response.

Yes I have already upgraded the AccountRight .NET SDK version to the latest to avoid any issues with the older version as well as expecting the new version should be more robust with features etc.

 

Re: 500 errors, we can try adding in the functionality to record the request_ids as you have suggested, but the concern here is our tool is an automated integration tool that runs daily basis without any manual intervention to integrate client data from/to our databases, therefore we were expecting to implement a 'retrying' feature into our tool so that we can retry the same request on MYOB a predefined number of times before marking the whole integration process as failed - which is what the clients complain was.

 

Therefore the primary requirement here was not to dig into the details on why it got failed, but to add in a retrying attempt to our client code. We can definitely go for the option of recording all the failing request_ids and send it to MYOB, but we were after implementing the retry feature first to add bit more reliability to our system and if it still fails we can dig into details. 

 

Therefore, my request was to get some info from MYOB on whether the SDK has got any builtin feature for retrying API requests. 

 

Thanks & regards,

Dinesh

 

 

 

 

 

 

 

Mike_James
Ultimate Partner
5,857 Posts
Ultimate Partner
New Zealand
Ultimate Partner

5,857Posts

1,026Kudos

756Solutions

Accepted Solution Solved

Re: Timeouts and retry options on AccountRight .NET SDK

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.

 

 

 

 


Regards, Mike (mike@datawise.co.nz)
DataWise Limited (www.datawise.co.nz), developers of:
DataWise ProActive - Custom Reporting from MYOB programs
(MYOB Business, including AccountRight Live, AccountRight v19.x and exo Payroll)

Bulk download of attachments (more details...)

Insulagroup
Partner
4 Posts
Partner

4Posts

0Kudos

0Solutions

Re: Timeouts and retry options on AccountRight .NET SDK

Hi @Mike_James,

 

Appreciate your detailed response and it sounds like it's the exact same situation that we are experiencing at the moment and I believe the solution you've come up is the exact same path that we should take as well.

It's great to hear that the 500 errors were going through on 2nd or at most on 4th attempt, which is definitely encouraging us to implement this retrying feature at our end even if it takes an initial effert as it'll be worth to improve the reliability in a two-way integration solution with it.

 

Thanks again,

Dinesh

Didn't find your answer here?

Try using advanced search to find a post more easily Advanced Search
or
Get the conversation started and make a new post Start a Post