Skip to content

Commit 130818d

Browse files
authored
fix: check that err.message is a string before attempting indexOf (#2173)
1 parent 7dbad91 commit 130818d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/nodejs-common/util.ts

+1
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,7 @@ export class Util {
671671
const authLibraryError = err;
672672
const autoAuthFailed =
673673
err &&
674+
typeof err.message === 'string' &&
674675
err.message.indexOf('Could not load the default credentials') > -1;
675676

676677
if (autoAuthFailed) {

0 commit comments

Comments
 (0)