octokit/go-octokit — pull request #56 by jingweno (2014-02-22 15:22:13+00:00)
Title: Always return *ResponseError in NewReesponseError

Previously it could happen that the response body can't be decoded and the
return error is a different type from *ResponseError. This causes downstream
usage to handle different types of errors.

The solution is to always return *ResponseError and make the decoding error as
part of the *ResponseError.