Skip to content

Commit

Permalink
Fix broken Poison.decode!
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljguarino committed Oct 25, 2022
1 parent 7f57837 commit 2e759b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/core/lib/core/services/versions.ex
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ defmodule Core.Services.Versions do
end

def record_scan(scan, %Version{} = version) when is_binary(scan) do
Poison.decode!(scan, as: Core.Scan.type())
|> record_scan(version)
with {:ok, scan} <- Poison.decode(scan, as: Core.Scan.type()),
do: record_scan(scan, version)
end

def record_scan(%{results: scan_result}, %Version{id: version_id}) do
Expand Down

0 comments on commit 2e759b5

Please sign in to comment.