Skip to content

Commit 95dcb64

Browse files
authored
fix: remove deprecated util.isError usage (#1119)
1 parent b92be2a commit 95dcb64

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
@@ -407,7 +407,7 @@ function LibrdKafkaError(e) {
407407
this.origin = 'kafka';
408408
}
409409
Error.captureStackTrace(this, this.constructor);
410-
} else if (!util.isError(e)) {
410+
} else if (!(e instanceof Error || Object.prototype.toString.call(e) === '[object Error]')) {
411411
// This is the better way
412412
this.message = e.message;
413413
this.code = e.code;

0 commit comments

Comments
 (0)