Constant 501 Errors
Hi,
Every request to fetch data from the MYOB API is returnning a MYOB.AccountRight.SDK.ApiCommunicationException exception
I am able to refresh the access tokens, this code has been in production for a number of years,
I updated to v2021.4.334 of MYOB.AccountRight.API.SDK and this has not helped
Sample Code
MyobConnection connection = EstablishMyobConnection(settings);
TaxCodeService tcsService = new TaxCodeService(connection.Configuration, null, connection.Keystore);
PagedCollection<TaxCode> taxCodes = tcsService.GetRange(connection.CompanyFile, "", connection.Credentials); <-- Error occurs here
Exception:
Message: Encountered a communication error (https://ar1.api.myob.com/accountright/e2--------------------------------d4/GeneralLedger/TaxCode/?)
I have blanked most of the GUID from the URL
RequestId: "f74da5da-2aec-415a-a1a7-ad0cb9a36aa5"
Stack Trace:
at MYOB.AccountRight.SDK.Extensions.ExceptionExtensions.ProcessException(Exception ex, Uri requestUri)
at MYOB.AccountRight.SDK.Services.ServiceBase.MakeApiGetRequestSync[T](Uri uri, ICompanyFileCredentials credentials, String eTag)
at MYOB.AccountRight.SDK.Services.ReadableRangeService`1.GetRange(CompanyFile cf, String queryString, ICompanyFileCredentials credentials, String eTag)
at Reflexion.CRM.Server.Processors.Myob.MyobArProvider.SetTaxCodes(IContext context, MyobArProcessorSettings settings, ProcessorResponse response) in D:\TFS Online\Main\Reflexion.CRM.Server.Myob\MyobArProvider.cs:line 1870
The Inner Exception
Message: The remote server returned an error: (501) Not Implemented.
Strack Trace:
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at MYOB.AccountRight.SDK.Communication.BaseRequestHandler.HandleResponseCallback[T,TResp](IAsyncResult asynchronousResult)