nabeelmukhtar / github-java-sdk

This project aims to provide a Java wrapper for Github API.
http://develop.github.com/
64 stars 22 forks source link

Error response is not reported #9

Closed thallgren closed 13 years ago

thallgren commented 13 years ago

I'm trying to add a key using the UserService.addKey() method. The method executes OK but no key is added. I debugged this method and concluded that I indeed got a 401 response from the server. This error is however discarded since the addKey method just ignores the returned InputStream.

The callApiPost() will always return an InputStream regardless of success or failure so how is the caller of this method supposed to detect an error?

nabeelmukhtar commented 13 years ago

This issue has been fixed in the master branch. Thanks for reporting it.