fix(agent): jason-safe error entries + correct handle_info return

Errors produced by Collectors.Host were keyword tuples {:tag, msg}, which
Jason cannot encode — metric push crashed the channel. Convert them to
plain maps with :tag and :message fields.

Reporter.handle_info/2 returned {:ok, socket}, which Slipstream rejects
(GenServer-style {:noreply, socket} is the only valid return for that
callback, unlike handle_connect/handle_join/handle_disconnect).
This commit is contained in:
Carsten 2026-04-21 22:15:32 +02:00
parent bfe39e71e1
commit 4f82701956
2 changed files with 2 additions and 2 deletions

View file

@ -46,7 +46,7 @@ defmodule ProxmoxAgent.Collectors.Host do
try do
{fun.(), nil}
rescue
e -> {fallback, {tag, Exception.message(e)}}
e -> {fallback, %{tag: Atom.to_string(tag), message: Exception.message(e)}}
end
end