From 2e759b564756edff84f7afb5ea7d91b98cdbe7a5 Mon Sep 17 00:00:00 2001 From: michaeljguarino Date: Tue, 25 Oct 2022 15:48:54 -0400 Subject: [PATCH] Fix broken Poison.decode! --- apps/core/lib/core/services/versions.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/core/lib/core/services/versions.ex b/apps/core/lib/core/services/versions.ex index e9b3a5fe8..70e350bc1 100644 --- a/apps/core/lib/core/services/versions.ex +++ b/apps/core/lib/core/services/versions.ex @@ -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