Skip to content

Commit d39c44e

Browse files
committed
Modified fetch_audio_file to only pass success response body back
1 parent 098fab7 commit d39c44e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/pa_ess/updater.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ defmodule PaEss.Updater do
166166
http_client = Application.get_env(:realtime_signs, :http_client)
167167

168168
case http_client.get(url) do
169-
{:ok, response} -> response.body
170-
{:error, error} -> Logger.info("Error getting PCM file: #{error}")
169+
{:ok, %HTTPoison.Response{status_code: status, body: body}} when status == 200 ->
170+
body
171171
end
172172
end
173173

0 commit comments

Comments
 (0)