Skip to content

Commit

Permalink
fix: LegacyFCM handle nil and replace with unknown (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
jowi-dev authored Aug 29, 2024
1 parent 8117ef4 commit 0edaf5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pigeon/legacy_fcm/config.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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)}"
Expand Down

0 comments on commit 0edaf5f

Please sign in to comment.