Forum Discussion

AJ88's avatar
AJ88
User
2 months ago

MYOB Advanced API unexpected/unstable behavior

Hi all,

 

I've just signed up here hoping someone can help me out with this issue that I am facing -- causing considerable integration problems which is not doing well for our customer -- who uses MYOB Advanced. The customer of course does not understand the issue as the essence of it is technical.

 

I notice this happening randomly, and recently more often than not. Using the contract REST API, just trying to retrieve records randomly errors out with status 500 ( Internal Server Error ), and other times the request succeeds with a 200 ( OK ) but returns nothing, while I am Accepting and expecting JSON, my fetch client errors out, because the response body returned is not valid JSON, and the exact same request will sometimes succeed and return the expected results. 

 

I think it's best if I showed a video demonstrating this, so have a look at this:

https://www.loom.com/share/1aad5298750e4d298b532ec746987964?sid=533f2a98-9057-48e0-bf0f-31223ffb2047

 

Can anyone experienced please tell me what this is about as to me it makes absolutely no sense?

3 Replies

Replies have been turned off for this discussion
  • Will_H's avatar
    Will_H
    MYOB Moderator

    Hi AJ88 ,

    I've forwarded some information about site errors being experienced through to your customer's implementation partner so they can check with their knowledege of the site.  I recommend you/the customer get in touch with them to get that information.  

     

    With that said, from my super quick review, there appear to be 2 main kinds of errors happening (Which are the same errors I commonly hear about from integrators).

    1. API Concurrent login limit being reached
      This will generally generate 401 errors, and depending on error handling, could lead to the other errors.  There should be some information about the error coming back as part of the packet header in these cases.
    2. Invalid values causing errors
      I saw a few cases of invalid accounts/project tasks/etc  being retrieved/edited. 
      Again these should be returning some amount of error handling via the API response, though 

     

    It's been awhile since I dealt with this part of the API, but I believe from looking at your video you're being returned a URL with the exception information in it as part of the problem calls 

     

    Unfortunately that's the limit of my understanding of this subsystem, if you need further support please reeach out either to your customer's implementer, or to Developer support as an accredited Advanced developer - https://developer.myob.com/api/advanced/

    Ngá Mihi,

    Will H
    Senior Product Platform Liaison (Enterprise)

    • AJ88's avatar
      AJ88
      User

      Hi Will,

       

      Thanks very much for your response and for forwarding on the site errors. As you can see from my video, I get a response of 200 OK with neither the records I am trying to retrieve neither any other information -- the exact same request will work on other attempts -- albeit rarely and return record(s) as you can see on the video. 

       

      The other error I see randomly is not in the video but does happen fairly often -- that is a 500 Internal Server Error.

      I don't think I am violating any API limitations -- the integration is still in development and is hardly used.

       

      A URL is returned with the exception information as part of a 200 OK response -- this is most irregular, but it isn't helpful because I am unable to see what the exception is which in turn makes it impossible to know what the problem is.

      Clicking Show Trace:



      • Will_H's avatar
        Will_H
        MYOB Moderator

        There's an exception URL reported back to you by the 200 OK message as the URL in your response?

        I agree with it being strange that you're getting a 200 OK response for an error state, but there is information being provided back to you with error.  

        In terms of errors, please refer to customer/implementation partner, they have a copy of the exact logging from telemetry for the last couple of weeks.


        I'm not really expert enough at this part of our APIs to help you chase this the whole way through, though this post from Stack Overflow might be informative:
        https://stackoverflow.com/questions/62521361/acumatica-rest-api-exception-messages

        It seems to indicate that the issue might be with your exact HTTP handler not staying open long enough to receive the followup response with full error?


        I really am going to stop here though, because I'm just as likely to lead you in the wrong direction if I keep speculating.  Hopefully another developer has some experience to share here, or this will need to come via standard support channels so the right people can action it.

        Regards,
        Will H

        Senior Product Platform Liaison (Enterprise)