diff --git a/lib/pigeon/legacy_fcm/config.ex b/lib/pigeon/legacy_fcm/config.ex index 89da6614..363660fe 100644 --- a/lib/pigeon/legacy_fcm/config.ex +++ b/lib/pigeon/legacy_fcm/config.ex @@ -167,7 +167,7 @@ defimpl Pigeon.Configurable, for: Pigeon.LegacyFCM.Config do def parse_error(data) do case Pigeon.json_library().decode(data) do {:ok, response} -> - response["reason"] |> Macro.underscore() |> String.to_existing_atom() + (response["reason"] || "unknown") |> Macro.underscore() |> String.to_existing_atom() error -> "JSON parse failed: #{inspect(error)}, body: #{inspect(data)}"