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

4XX Level Responses Fail Silently #4

Open
derekdowling opened this issue Jun 26, 2015 · 1 comment
Open

4XX Level Responses Fail Silently #4

derekdowling opened this issue Jun 26, 2015 · 1 comment

Comments

@derekdowling
Copy link

If the response from httpGet returns a non-success status code (ie 401), the library fails silently and returns an empty JSON slice. It'd be great if non-success statuses could be made more evident in some manner, via panic, logging, or some other manner.

I'm uncertain of what your preferences or thoughts on this might be otherwise I'd present a solution to this.

@akira
Copy link
Owner

akira commented Jun 26, 2015

Agree that the client should surface those, perhaps as part of the error returned? If you wanted to do a MR, will gladly accept.

Also, just wanted to let you know there is a Go Client implementation from Ken Barber as well, I haven't compared or looked at it in detail: https://github.com/kbarber/puppetdb-client-go

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