voorkant / voorkant-core

https://voorkant.org/
MIT License
2 stars 3 forks source link

turn websocket close from a confusing error into a clear one #114

Closed Habbie closed 1 month ago

Habbie commented 2 months ago

before:

* WS-DEC: passing [CLOSE payload=2/2]
terminate called after throwing an instance of 'nlohmann::json_abi_v3_11_2::detail::parse_error'
  what():  [json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - invalid literal; last read: '<U+0003>'
Aborted

after:

* WS-DEC: passing [CLOSE payload=2/2]
2024-09-07 14:10:26 [ERROR][recv in ../src/WSConn.cpp:77] got CURL_WS_CLOSE, reason=1000
terminate called after throwing an instance of 'std::runtime_error'
  what():  HA websocket disconnected
Aborted (core dumped)