File tree 2 files changed +1
-27
lines changed
2 files changed +1
-27
lines changed Original file line number Diff line number Diff line change @@ -337,13 +337,7 @@ function makeAuthenticatedRequestFactory(config) {
337
337
}
338
338
339
339
function onAuthenticated ( err , authenticatedReqOpts ) {
340
- // google-auth-library returns a "Could not load..." error if it can't get
341
- // an access token. However, it's possible an API request doesn't need to
342
- // be authenticated, e.g. when downloading a file from a public bucket. We
343
- // consider this error a warning, and allow the request to go through
344
- // without authentication, relying on the upstream API to return an error
345
- // the user would find more helpful, should one occur.
346
- if ( err && err . message . indexOf ( 'Could not load' ) === - 1 ) {
340
+ if ( err ) {
347
341
if ( stream ) {
348
342
stream . destroy ( err ) ;
349
343
} else {
Original file line number Diff line number Diff line change @@ -535,26 +535,6 @@ describe('common/util', function() {
535
535
} ;
536
536
} ) ;
537
537
538
- it ( 'should not care about "Could not load" errors' , function ( done ) {
539
- var error = new Error ( 'Could not load' ) ;
540
-
541
- utilOverrides . decorateRequest = function ( ) { } ;
542
-
543
- authClient . authorizeRequest = function ( rOpts , callback ) {
544
- setImmediate ( function ( ) {
545
- callback ( error ) ;
546
- } ) ;
547
- } ;
548
-
549
- var makeAuthenticatedRequest = util . makeAuthenticatedRequestFactory ( ) ;
550
- makeAuthenticatedRequest ( { } , {
551
- onAuthenticated : function ( err ) {
552
- assert . strictEqual ( err , null ) ;
553
- done ( ) ;
554
- }
555
- } ) ;
556
- } ) ;
557
-
558
538
it ( 'should invoke the callback with error' , function ( done ) {
559
539
var makeAuthenticatedRequest = util . makeAuthenticatedRequestFactory ( ) ;
560
540
makeAuthenticatedRequest ( { } , function ( err ) {
You can’t perform that action at this time.
0 commit comments