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
Health reports are failing because :alarm_handler.get_alarms() can return a single tuple instead of a list which is expected in the alarm report:
@impl Report
def alarms do
for {id, description} <- :alarm_handler.get_alarms(), into: %{} do
try do
{inspect(id), inspect(description)}
catch
_, _ ->
{"bad alarm term", ""}
end
end
end
This prevents the health report from proceeding with the other reports like metrics and connectivity.
On a test device:
iex(39)> NervesHubLink.Extensions.Health.DefaultReport.alarms
** (Protocol.UndefinedError) protocol Enumerable not implemented for {:error, :bad_module} of type Tuple. This protocol is implemented for the following type(s): CircularBuffer, Date.Range, File.Stream, Function, GenEvent.Stream, HashDict, HashSet, IO.Stream, Jason.OrderedObject, List, Map, MapSet, Range, Stream
(elixir 1.17.2) lib/enum.ex:1: Enumerable.impl_for!/1
(elixir 1.17.2) lib/enum.ex:166: Enumerable.reduce/3
(elixir 1.17.2) lib/enum.ex:4423: Enum.reduce/3
(nerves_hub_link 2.5.2) lib/nerves_hub_link/extensions/health/default_report.ex:25: NervesHubLink.Extensions.Health.DefaultReport.alarms/0
iex:39: (file)
iex(39)> :alarm_handler.get_alarms()
{:error, :bad_module}
The text was updated successfully, but these errors were encountered:
Health reports are failing because
:alarm_handler.get_alarms()
can return a single tuple instead of a list which is expected in the alarm report:This prevents the health report from proceeding with the other reports like metrics and connectivity.
On a test device:
The text was updated successfully, but these errors were encountered: