Skip to content

fix: remove deprecated util.isError usage#1119

Merged
GaryWilber merged 1 commit intoBlizzard:masterfrom
aryamohanan:fix-util-error
Feb 24, 2025
Merged

fix: remove deprecated util.isError usage#1119
GaryWilber merged 1 commit intoBlizzard:masterfrom
aryamohanan:fix-util-error

Conversation

@aryamohanan
Copy link
Copy Markdown
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

}
Error.captureStackTrace(this, this.constructor);
} else if (!util.isError(e)) {
} else if (!(e instanceof Error || Object.prototype.toString.call(e) === '[object Error]')) {
Copy link
Copy Markdown
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
Copy Markdown
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
martijnimhoff added a commit to withthegrid/node-rdkafka that referenced this pull request Mar 30, 2026
* Use macos-14 for test workflow (Blizzard#1088)

This resolve "The macOS-12 environment is deprecated, consider switching to macOS-13, macOS-14 (macos-latest) or macOS-15." errors

* Cooperative Rebalance (Blizzard#1081)

* Update librdkafka to 2.6.0

* Update librdkafka to 2.6.1 (Blizzard#1107)

* Update librdkafka version in readme (Blizzard#1108)

* Update librdkafka to 2.8.0 (Blizzard#1114)

* Update librdkafka to 2.8.0

* add node 22 to test matrix

---------

Co-authored-by: garywilb <garywilb+odspmdb@microsoft.com>

* Fix submodule commit for 2.8.0 (Blizzard#1115)

Co-authored-by: garywilb <garywilb+odspmdb@microsoft.com>

* Add support for node 23 (Blizzard#1116)

* fix: remove deprecated util.isError usage (Blizzard#1119)

* v3.3.1 (Blizzard#1120)

* Update librdkafka to 2.10.0 (Blizzard#1126)

* Update librdkafka to 2.10.1 (Blizzard#1134)

* Update librdkafka to 2.11.1 (Blizzard#1137)

* Update librdkafka to 2.12.0 (Blizzard#1139)

* Update nan to support node 24 (Blizzard#1140)

* fix: update deps and remove duplicate method

---------

Co-authored-by: Gary Wilber <41303831+GaryWilber@users.noreply.github.com>
Co-authored-by: Serhii Franchuk <44800855+serj026@users.noreply.github.com>
Co-authored-by: garywilb <garywilb+odspmdb@microsoft.com>
Co-authored-by: Arya <arya.mohanan@ibm.com>
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