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

doRequest does not provide enough information when the response is not a 200 #30

Open
digitalfiz opened this issue Jan 11, 2023 · 0 comments

Comments

@digitalfiz
Copy link

Google provides a reason why for some requests when they come back so it would be helpful to provide that response when debugging issues.

We have an issue right now that we can't figure out where after a few days weeks of our app running we start getting 403s from the api but all we get is

webrisk: 2023/01/11 21:01:51 database.go:218: ListUpdate failure (3882620): webrisk: unexpected server response code: 403

Which is not really useful at all and I've tracking it down to line 96 in api.go.

Maybe the return error could contain the body as a string or something until a more developed response error can be created?

I figure this isn't handled yet because the documentation doesn't provide a definition of the possible response bodies when it's not a 200 so without just breaking random parts of the request to see what the responses are it's impossible to know what some type of ErrorResponse would look like.

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