From 19aa86dd0e55f56bde5a8816fe6778f35f81b047 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Wed, 15 Sep 2021 15:09:52 +0300 Subject: [PATCH] fixup! Change UNKNOWN_CODE_PLEASE_REPORT to identify uknown code --- lib/protocol/sequences/Sequence.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/protocol/sequences/Sequence.js b/lib/protocol/sequences/Sequence.js index 889470021..29ae79687 100644 --- a/lib/protocol/sequences/Sequence.js +++ b/lib/protocol/sequences/Sequence.js @@ -43,8 +43,8 @@ Sequence.prototype.hasErrorHandler = function() { }; Sequence.prototype._packetToError = function(packet) { - var code = ErrorConstants[packet.errno] || 'UNKNOWN_CODE_PLEASE_REPORT: ' + packet.errno; - var err = new Error(code + ': ' + packet.message); + var code = ErrorConstants[packet.errno] || 'UNKNOWN_CODE_PLEASE_REPORT'; + var err = new Error(code + '[' + packet.errno + ']: ' + packet.message); err.code = code; err.errno = packet.errno;