diff --git a/lib/microwaveprop/ionosphere/giro_client.ex b/lib/microwaveprop/ionosphere/giro_client.ex index 138fbe56..44093b5d 100644 --- a/lib/microwaveprop/ionosphere/giro_client.ex +++ b/lib/microwaveprop/ionosphere/giro_client.ex @@ -58,8 +58,11 @@ defmodule Microwaveprop.Ionosphere.GiroClient do {:ok, %{status: 200, body: body}} when is_binary(body) -> parse_tabular(body) - {:ok, %{status: status, body: body}} -> - {:error, "GIRO HTTP #{status}: #{inspect(body)}"} + {:ok, %{status: 404}} -> + {:error, :giro_api_unavailable} + + {:ok, %{status: status}} -> + {:error, "GIRO HTTP #{status}"} {:error, reason} -> {:error, "GIRO request failed: #{inspect(reason)}"} diff --git a/lib/microwaveprop/workers/ionosphere_fetch_worker.ex b/lib/microwaveprop/workers/ionosphere_fetch_worker.ex index 0cb319ee..d94958f3 100644 --- a/lib/microwaveprop/workers/ionosphere_fetch_worker.ex +++ b/lib/microwaveprop/workers/ionosphere_fetch_worker.ex @@ -74,5 +74,6 @@ defmodule Microwaveprop.Workers.IonosphereFetchWorker do end defp format_reason(reason) when is_binary(reason), do: reason + defp format_reason(:giro_api_unavailable), do: "GIRO API endpoint unavailable (404)" defp format_reason(reason), do: inspect(reason, printable_limit: 200) end