Skip to content

Commit 54fb24a

Browse files
committed
Change UNKNOWN_CODE_PLEASE_REPORT to identify uknown code
Changes UNKNOWN_CODE_PLEASE_REPORT to include packet.errno in it. This makes it easier to identify what the code is even if the code is not yet supported: ``` (node:1) UnhandledPromiseRejectionWarning: Error: UNKNOWN_CODE_PLEASE_REPORT: Query execution was interrupted, query_timeout exceeded ```
1 parent 3430c51 commit 54fb24a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/protocol/sequences/Sequence.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Sequence.prototype.hasErrorHandler = function() {
4444

4545
Sequence.prototype._packetToError = function(packet) {
4646
var code = ErrorConstants[packet.errno] || 'UNKNOWN_CODE_PLEASE_REPORT';
47-
var err = new Error(code + ': ' + packet.message);
47+
var err = new Error(code + '[' + packet.errno + ']: ' + packet.message);
4848
err.code = code;
4949
err.errno = packet.errno;
5050

0 commit comments

Comments
 (0)