Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
elixir 1.10.2
elixir 1.10.3-otp-23
6 changes: 5 additions & 1 deletion lib/pigeon/fcm/config.ex
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,12 @@ defimpl Pigeon.Configurable, for: Pigeon.FCM.Config do

def parse_error(data) do
case Pigeon.json_library().decode(data) do
{:ok, %{"reason" => reason}} ->
reason |> Macro.underscore() |> String.to_existing_atom()

{:ok, response} ->
response["reason"] |> Macro.underscore() |> String.to_existing_atom()
Logger.warn("error with no reason #{response["error"]}")
:unspecified_reason

error ->
"JSON parse failed: #{inspect(error)}, body: #{inspect(data)}"
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Pigeon.Mixfile do
use Mix.Project

@version "1.6.1"
@version "1.7.1"

def project do
[
Expand Down