SIGN IN SIGN UP

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>
T
Thomas Munzer committed
995770bcfec2fe30449db4a2bc281f4c467df864
Parent: 49df2db
Committed by GitHub <noreply@github.com> on 6/15/2026, 4:37:30 AM