Skip to content
Permalink
Browse files Browse the repository at this point in the history
Add StatusCode to error message if refreshToken() fails due to an sus…
…pended app (#44)

Add StatusCode to error message if refreshToken() fails due to an suspended app
  • Loading branch information
andygrunwald committed Mar 8, 2021
1 parent 556cb68 commit d24f14f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion transport.go
Expand Up @@ -170,7 +170,7 @@ func (t *Transport) refreshToken(ctx context.Context) error {
defer resp.Body.Close()

if resp.StatusCode/100 != 2 {
return fmt.Errorf("request %+v received non 2xx response status %q with body %+v and TLS %+v", resp.Request, resp.Body, resp.Request, resp.TLS)
return fmt.Errorf("received non 2xx response status %q when fetching %v", resp.Status, req.URL)
}

return json.NewDecoder(resp.Body).Decode(&t.token)
Expand Down

0 comments on commit d24f14f

Please sign in to comment.