Reviewers: adg,
Message:
Hello adg@golang.org (cc: golang-dev@googlegroups.com),
I'd like you to review this change to
https://code.google.com/p/goauth2/
Description:
oauth: Add a bit of context to the error message for update token
errors.
It's particulary important when update token is called implicitly during
HTTP roundtrip. Without context, it gives an impression that the URL
being fetched by HTTP client has a problem.
Please review this at http://codereview.appspot.com/6494084/
Affected files:
M oauth/oauth.go
Index: oauth/oauth.go
===================================================================
--- a/oauth/oauth.go
+++ b/oauth/oauth.go
@@ -255,7 +255,7 @@
}
defer r.Body.Close()
if r.StatusCode != 200 {
- return errors.New("invalid response: " + r.Status)
+ return errors.New("invalid response while updating token: " + r.Status)
}
var b struct {
Access string `json:"access_token"`