MYOBCommunity
Partner Zone
|
|
Partner Zone

API Returns 500 Internal Error when trying to retrieve Invoices from the API

This thread is now closed to new comments.
Some of the links provided in this thread may no longer be available or relevant.
If you have a question please start a new post.
Partner MEX_IT
1 Post
Partner
Australia
MEX_IT
Partner

1Posts

0Kudos

0Solutions

API Returns 500 Internal Error when trying to retrieve Invoices from the API

Hi, We have an automated interface that runs every morning with our internal CRM. When pulling down invoices from the API we randomly receive a 500 internal error. It is totally random now, we have had it occur at least once per week. This is the exception we're receiving in the logs:

 

MYOB.AccountRight.SDK.ApiCommunicationException: Encountered a communication error (https://api.myob.com/accountright/GUID/Sale/Invoice/Service/?$top=100&$skip=12900&$orderby=Date desc) ---> System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at MYOB.AccountRight.SDK.Communication.BaseRequestHandler.HandleResponseCallback[T,TResp](IAsyncResult asynchronousResult) in c:\projects\accountright-live-api-net-sdk\MYOB.API.SDK\SDK\Communication\BaseRequestHandler.cs:line 118
--- End of inner exception stack trace ---
at MYOB.AccountRight.SDK.Extensions.ExceptionExtensions.ProcessException(Exception ex, Uri requestUri) in c:\projects\accountright-live-api-net-sdk\MYOB.API.SDK\SDK\Extensions\ExceptionExtensions.cs:line 69
at MYOB.AccountRight.SDK.Services.ServiceBase.MakeApiGetRequestSync[T](Uri uri, ICompanyFileCredentials credentials, String eTag) in c:\projects\accountright-live-api-net-sdk\MYOB.API.SDK\SDK\Services\ServiceBase.cs:line 151
at MYOB.AccountRight.SDK.Services.ReadableRangeService`1.GetRange(CompanyFile cf, String queryString, ICompanyFileCredentials credentials, String eTag) in c:\projects\accountright-live-api-net-sdk\MYOB.API.SDK\SDK\Services\Version2\ReadableRangeService.cs:line 80

 

Any ideas why this is occuring? 

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