Skip to content

Commit

Permalink
fix: check that err.message is a string before attempting indexOf (#2173
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ddelgrosso1 authored Mar 30, 2023
1 parent 7dbad91 commit 130818d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/nodejs-common/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,7 @@ export class Util {
const authLibraryError = err;
const autoAuthFailed =
err &&
typeof err.message === 'string' &&
err.message.indexOf('Could not load the default credentials') > -1;

if (autoAuthFailed) {
Expand Down

0 comments on commit 130818d

Please sign in to comment.