Skip to content

Commit

Permalink
Merge pull request #145 from keyan/kp_handle_poison_3_decode
Browse files Browse the repository at this point in the history
Handle Poison 3.X decode error tuples
  • Loading branch information
edgurgel authored Dec 4, 2017
2 parents b5db7fe + 262a1c2 commit e62eeee
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/verk/job.ex
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ defmodule Verk.Job do
case Poison.decode(payload, as: %__MODULE__{}) do
{:ok, job} -> {:ok, %Verk.Job{job | original_json: payload}}
{:error, error} -> {:error, error}
{:error, :invalid, pos} -> {:error, "Invalid json at position: #{pos}"}
end
end

Expand Down

0 comments on commit e62eeee

Please sign in to comment.