Closed AGenius closed 5 months ago
PETOSS-362
Thanks for raising an issue, a ticket has been created to track your request
Updated Xero-NetStandard SDK v3.34.5 with changes to throw specific exceptions with the status code and actual message instead of 500. Please verify.
SDK you're using (please complete the following information):
Describe the bug A clear and concise description of what the bug is. When updating my API Wrapper I was testing a call to get a random bank transfer. I was calling the wrong path (BankTransaction instead of BankTransfer) but passing a bank transfer guid. When this was called I was getting an ApiException from the ApiClient code
throw new ApiException(500, e.Message);
of "Unexpected character encountered while parsing value: T. Path '', line 0, position 0." I would expect a clean "item not found" response from your ApiClient call when it received "The resource you're looking for cannot be found" but it does not It should detect a StatusCode = "NotFound" and continue .To Reproduce Steps to reproduce the behavior: Call the BankTransaction endpoint with a Guid that does not exist. I have tested not found items with other endpoints and they are the same issue
Expected behaviour A clear and concise description of what you expected to happen. Return the correct error response as "Not Found"
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here. Not sure if this has always been this way