Skip to content

Commit 1188897

Browse files
committed
DEVEXP-672 : NullPointerException thrown when error.message is null.
1 parent 2d16c72 commit 1188897

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/responder.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,8 +1236,8 @@ function operationErrorListener(error) {
12361236
return;
12371237
}
12381238
}
1239-
const errorMessage = error.message.toString();
1240-
if(errorMessage.includes('EPROTO') && errorMessage.includes('SSL routines') &&
1239+
const errorMessage = error.message ? error.message.toString(): null;
1240+
if(errorMessage && errorMessage.includes('EPROTO') && errorMessage.includes('SSL routines') &&
12411241
(errorMessage.includes('wrong version number') || errorMessage.includes('WRONG_VERSION_NUMBER'))) {
12421242
error = new Error('You have attempted to access an HTTP server using HTTPS. Please check your configuration.\n' +
12431243
errorMessage);

0 commit comments

Comments
 (0)