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) {
7272} ;
7373
7474/**
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
7676 * refreshing the access token.
7777 * @param Object.<string,string> tokenHeaders A map of header names to values.
7878 * @return {Service_ } This service, for chaining.
@@ -282,7 +282,11 @@ Service_.prototype.hasAccess = function() {
282282 var now = getTimeInSeconds_ ( new Date ( ) ) ;
283283 if ( expires_time - now < Service_ . EXPIRATION_BUFFER_SECONDS_ ) {
284284 if ( token . refresh_token ) {
285- this . refresh ( ) ;
285+ try {
286+ this . refresh ( ) ;
287+ } catch ( e ) {
288+ return false ;
289+ }
286290 } else {
287291 return false ;
288292 }
You can’t perform that action at this time.
0 commit comments