Skip to content

Commit 7976348

Browse files
committed
Pass error along with error event
1 parent 2ffed22 commit 7976348

File tree

8 files changed

+15
-9
lines changed

8 files changed

+15
-9
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [v0.2.2] - 2025-01-08
9+
10+
### Changed
11+
12+
- Unit errors now pass the error along.
13+
814
## [v0.2.1] - 2025-01-08
915

1016
### Fixed
1117

12-
- Fixed timeouts and socket errors not emitting the "close" event like the documentation says they do.
18+
- Fixed unit timeouts and socket errors not emitting the "close" event like the documentation says they do.
1319

1420
## [v0.2.0] - 2025-01-05
1521

cjs/unit.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cjs/unit.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

esm/unit.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

esm/unit.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-intellicenter",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"description": "NodeJS library for communicating with a Pentair IntelliCenter controller",
55
"keywords": [
66
"pentair",

src/unit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export class Unit extends EventEmitter {
6363
this.client.on("error", (evt) => {
6464
// todo: emit event so we can reconnect? auto reconnect?
6565
debugUnit("error in websocket: $o", evt);
66-
this.emit("error");
66+
this.emit("error", evt);
6767
socketCleanup();
6868
});
6969
this.client.on("open", () => {

0 commit comments

Comments
 (0)