API Timeouts (Gateway Timeout 504)

devatwaddle
1 Post
User

1Posts

0Kudos

0Solutions

API Timeouts (Gateway Timeout 504)

Hi all,

 

Has there been a noticeable rise in API timeout erros in the past few days, anyone?

 what we're experiencing with our different Myob calls - 

{"Name":"GatewayTimeout","Message":"Connection to the API has timed out",
"AdditionalDetails":"Maximum call time is 29 seconds","ErrorCode":null,"Severity":"Error","LearnMore":"http://developer.myob.com/api/accountright/api-overview/error-messages"}


Any recommendations on how to get around the problem? 

 

3 REPLIES 3
Mike_James
Ultimate Partner
5,850 Posts
Ultimate Partner
New Zealand
Ultimate Partner

5,850Posts

1,079Kudos

756Solutions

Re: API Timeouts (Gateway Timeout 504)

Hi @devatwaddle , this can happen at any time. You need to build in code to catch these type of errors and retry the call. 


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...)

JeremyF
Experienced User
34 Posts
Experienced User
Experienced User

34Posts

4Kudos

3Solutions

Re: API Timeouts (Gateway Timeout 504)

Mike do you find that the calls time out but acutally complete at the API end?

 

Other than searching for an Order/Invoice Number how do you retry to ensure that you don't create duplicate entries?

 

Cheers

Jeremy

 

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

5,850Posts

1,079Kudos

756Solutions

Re: API Timeouts (Gateway Timeout 504)

Hi Jeremy @JeremyF , typically we are extracting a range of data to add or update our local database, for reporting purposes. So originally, this type of error meant that we received no json payload, and the code fell over. Now, with a retry option, it will usually succeed with 4 tries, and our code can then process the received json. The code checks every transaction to see if it's an add or update situation, and we've included the new journalhistory endpoint now which we can process and remove transactions which have been deleted in AccountRight.


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...)

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