Skip to content

Commit d147944

Browse files
committed
Fix deprecation warning
1 parent 39bd9f9 commit d147944

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/error.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ function LibrdKafkaError(e) {
405405
this.origin = 'kafka';
406406
}
407407
Error.captureStackTrace(this, this.constructor);
408-
} else if (!util.isError(e)) {
408+
} else if (!(Object.prototype.toString(e) === "[object Error]" || e instanceof Error)) {
409409
// This is the better way
410410
this.message = e.message;
411411
this.code = e.code;

0 commit comments

Comments
 (0)