Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with item requested not found when calling endpoing #490

Closed
AGenius opened this issue Nov 3, 2023 · 3 comments
Closed

Issue with item requested not found when calling endpoing #490

AGenius opened this issue Nov 3, 2023 · 3 comments

Comments

@AGenius
Copy link

AGenius commented Nov 3, 2023

SDK you're using (please complete the following information):

  • Version [e.g. 2.3.10]
  • Version 3.33

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.
image

Additional context
Add any other context about the problem here.
Not sure if this has always been this way

Copy link

github-actions bot commented Nov 3, 2023

PETOSS-362

Copy link

github-actions bot commented Nov 3, 2023

Thanks for raising an issue, a ticket has been created to track your request

@thomas-anu
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants