FAQ
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"`

Search Discussions

  • Andrew Gerrand at Sep 6, 2012 at 1:01 am
    LGTM
  • Andrew Gerrand at Sep 6, 2012 at 1:04 am
    For me to accept this change you must sign the contributor license agreement
    http://golang.org/doc/contribute.html#Copyright
    On 5 September 2012 22:37, wrote:
    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"`
  • Manu Garg at Sep 6, 2012 at 4:32 am
    Done.

    On Thu, Sep 6, 2012 at 6:33 AM, Andrew Gerrand wrote:

    For me to accept this change you must sign the contributor license
    agreement
    http://golang.org/doc/contribute.html#Copyright
    On 5 September 2012 22:37, wrote:
    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"`


    --
    Manu Garg <http://www.manugarg.com>
    Page Notes<https://chrome.google.com/webstore/detail/omjdheidbhoghpfdnndkgoelfiogjfla>-
    Chrome extension to take notes for the web pages that you visit!
    "Journey is the destination of life."
  • Adg at Sep 6, 2012 at 5:13 am
    *** Submitted as
    http://code.google.com/p/goauth2/source/detail?r=ee227149d571 ***

    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.

    R=adg
    CC=golang-dev
    http://codereview.appspot.com/6494084

    Committer: Andrew Gerrand <adg@golang.org>


    http://codereview.appspot.com/6494084/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedSep 5, '12 at 1:03p
activeSep 6, '12 at 5:13a
posts5
users2
websitegolang.org

2 users in discussion

Adg: 3 posts Manu Garg: 2 posts

People

Translate

site design / logo © 2022 Grokbase