File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ Service_.prototype.setTokenFormat = function(tokenFormat) {
72
72
} ;
73
73
74
74
/**
75
- * Sets the additional HTTP headers that should be sent when retrieving or
75
+ * Sets the additional HTTP headers that should be sent when retrieving or
76
76
* refreshing the access token.
77
77
* @param Object.<string,string> tokenHeaders A map of header names to values.
78
78
* @return {Service_ } This service, for chaining.
@@ -282,7 +282,11 @@ Service_.prototype.hasAccess = function() {
282
282
var now = getTimeInSeconds_ ( new Date ( ) ) ;
283
283
if ( expires_time - now < Service_ . EXPIRATION_BUFFER_SECONDS_ ) {
284
284
if ( token . refresh_token ) {
285
- this . refresh ( ) ;
285
+ try {
286
+ this . refresh ( ) ;
287
+ } catch ( e ) {
288
+ return false ;
289
+ }
286
290
} else {
287
291
return false ;
288
292
}
You can’t perform that action at this time.
0 commit comments