Fixed downloader to convert response failure to a string before logging

This was causing crashes with the logger so we make the conversion to a string explicit now.

Milestone: patch
This commit is contained in:
Brooke Kuhlmann
2026-07-30 09:49:11 -06:00
parent c8f34c2afe
commit 8f43b21c3d
+1 -1
View File
@@ -24,7 +24,7 @@ module Terminus
def log result, uri
case result
in Success then logger.info { "Downloaded: #{uri}." }
in Failure(HTTP::Response => response) then log_error response.body
in Failure(HTTP::Response => response) then log_error response.body.to_s
in Failure(String => message) then log_error message
else log_error "Unable to download: #{uri.inspect}."
end