-
Notifications
You must be signed in to change notification settings - Fork 31
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
Some retrieve functions in client package swallow the errors #69
Comments
Hi @jizh6311 , Can you share some of the code that you wrote where this behavior was problematic? I think I know what you ran into, but would love to see it from you just so I'm not making assumptions. Here's the code that generates the go client library: https://github.com/FusionAuth/fusionauth-client-builder/blob/master/src/main/client/go.client.ftl#L22 |
@mooreds Thanks for your reply! What I ran into was straightforward: when the apiKey was invalid, this code section was unable to get the unauthorized error. Instead, the error was nil.
More specifically, I notice the error is |
Yes, I was seeing that too. I think it might be because we always expect a response back from the groups API (unless, of course, the server is down or the API key is invalid). Will think about this a bit. Appreciate the response. |
I realize some client functions add
nil
error reference to the next call. For example: https://github.com/FusionAuth/go-client/blob/master/pkg/fusionauth/Client.go#L3420. Is that intentional? (But some other functions declare an error and pass it to the next call)I had some bad experience with troubleshooting when I had the wrong FusionAuth API. Perhaps getting an explicit 401 error is more helpful?
The text was updated successfully, but these errors were encountered: