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

Failed but succesfull HTTP calls hard to debug #111

Open
kvij opened this issue Jul 1, 2024 · 0 comments
Open

Failed but succesfull HTTP calls hard to debug #111

kvij opened this issue Jul 1, 2024 · 0 comments

Comments

@kvij
Copy link
Contributor

kvij commented Jul 1, 2024

When the HTTP call itself succeeds there is no error given while the action does fail.
This happens when there is a non 2xx status code like when an invalid API KEY is provided or there is a subscription issue.
Normally this can be checked in the response but this library handles responses without returning them.

So even if the status code indicates a failure the response of the library is a normal result without an error. The result struct will contain the default zero values of the type. The only way to debug this is by actually using a debugger to inspect the values.

I think that the status code should be checked for non 2xx status codes and an error with the status code and perhaps even the body should be returned.

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

1 participant