You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Surface WebSocket errors on UtilResponse (closes#29) (#31)
* feat(device_utils): surface WebSocket errors on UtilResponse (closes#29)
UtilResponse gains ws_error / ws_close_code so a consumer can distinguish a
clean WebSocket completion from an errored, abnormally-closed, or
never-started one (previously the error was only logged and discarded):
- on_error records the first transport error (was a discard-only lambda);
- _on_close records the close code and flags a non-1000 abnormal close;
- start_with_trigger records ws_error when the WS factory returns None or
raises during setup.
Additive and backward-compatible: ws_error stays None on a clean completion
or a trigger-only command. Adds unit tests for each path.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs(changelog): note ws_error/ws_close_code on UtilResponse (#29)
* chore(release): bump version to 0.63.1
* refactor(device_utils): address Copilot review on ws_error capture
- Guard the WS-factory-None ws_error assignment (first-write-wins, matching
_on_error / _on_close).
- Neutralize the except-path ws_error message ('trigger/WebSocket setup
error') since that except also wraps trigger_fn(), not only WS setup.
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,24 @@
1
1
# CHANGELOG
2
+
## Version 0.63.1 (June 2026)
3
+
4
+
**Released**: June 14, 2026
5
+
6
+
This patch release lets callers of the device-utility helpers detect WebSocket failures that were previously only logged.
7
+
8
+
---
9
+
10
+
### 1. BUG FIXES
11
+
12
+
#### **Device Utilities: surface WebSocket errors on `UtilResponse`**
13
+
`UtilResponse` now exposes `ws_error` and `ws_close_code` so callers can distinguish a clean WebSocket completion from an errored, abnormally-closed, or never-started one. Previously a WebSocket transport error was only logged and discarded, and a WS-backed command whose WebSocket failed to start was indistinguishable from a healthy trigger-only command.
14
+
-`_on_error` records the first transport error (was a discard-only callback).
15
+
-`_on_close` records the close status code and flags a non-1000 abnormal close.
16
+
-`start_with_trigger` records `ws_error` when the WebSocket factory returns `None` or raises during setup.
17
+
18
+
Additive and backward-compatible: `ws_error` stays `None` on a clean completion or a trigger-only command. (#29)
0 commit comments