Forum Discussion

devatwaddle's avatar
9 months ago

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? 

 

  • Mike_James's avatar
    Mike_James
    Ultimate Cover User

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

    • JeremyF's avatar
      JeremyF
      Experienced User

      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's avatar
        Mike_James
        Ultimate Cover User

        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.