Skip to content

Commit bd2861e

Browse files
committed
fix: remove deprecated util.isError usage
1 parent dc7615d commit bd2861e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/error.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,12 @@ function LibrdKafkaError(e) {
407407
this.origin = 'kafka';
408408
}
409409
Error.captureStackTrace(this, this.constructor);
410-
} else if (e instanceof Error || Object.prototype.toString.call(e) === '[object Error]') {
410+
} else if (
411+
!(
412+
e instanceof Error ||
413+
Object.prototype.toString.call(e) === "[object Error]"
414+
)
415+
) {
411416
// This is the better way
412417
this.message = e.message;
413418
this.code = e.code;

0 commit comments

Comments
 (0)