Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove deprecated util.isError usage #1119

Merged
merged 1 commit into from
Feb 24, 2025

Conversation

aryamohanan
Copy link
Contributor

Fixes an existing issue #1117 caused by the removal of util.isError. util.isError was removed in Node.js v23 release, see nodejs/node#52744

  • Replaced util.isError(e) with instanceof Error and Object.prototype.toString.call(e) === '[object Error]'
  • Ensured compatibility with Node.js v23

@@ -407,7 +407,7 @@ function LibrdKafkaError(e) {
this.origin = 'kafka';
}
Error.captureStackTrace(this, this.constructor);
} else if (!util.isError(e)) {
} else if (!(e instanceof Error || Object.prototype.toString.call(e) === '[object Error]')) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

util.error removed in v23, see: nodejs/node@dc379626ab

@aryamohanan
Copy link
Contributor Author

@GaryWilber could you please take a look at this PR?

@GaryWilber GaryWilber merged commit 95dcb64 into Blizzard:master Feb 24, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants