FIX: improved error handling for subscriptions

This commit is contained in:
Dominik Meyer 2024-02-18 21:23:44 +01:00
parent 0f555f7fad
commit c2095a6257
Signed by: byterazor
GPG Key ID: EABDA0FD5981BC97
1 changed files with 6 additions and 0 deletions

View File

@ -238,9 +238,15 @@ sub NTFY_WS_CB
my $name = $hash->{NAME};
readingsBeginUpdate($hash);
readingsBulkUpdate($hash, "state", "error");
readingsBulkUpdate($hash, "error", $error);
readingsEndUpdate($hash,1);
NTFY_LOG(LOG_ERROR, "error while connecting to websocket: $error ") if $error;
NTFY_LOG(LOG_DEBUG, "websocket callback called");
return $error;
}
sub NTFY_Read