Moving error handlers to the cache implementations.

This commit is contained in:
Burcu Dogan
2014-05-21 15:56:44 +02:00
parent ef33919251
commit 0476447419
4 changed files with 46 additions and 14 deletions

View File

@@ -98,7 +98,7 @@ func (t *authorizedTransport) RoundTrip(req *http.Request) (resp *http.Response,
if token == nil && cache != nil {
// Try to read from cache initially
token, _ := cache.Read()
token = cache.Read()
}
if token == nil || token.Expired() {
// Check if the token is refreshable.