use directly the exception message when priting the error message

This commit is contained in:
Emilien Devos 2024-04-21 22:40:36 +02:00
parent 496acbdd7f
commit a0052d6eaa

View File

@ -39,8 +39,7 @@ spawn do
response = JSON.parse(client.get("/api/checks?api-key=ro-52iHyp6LBqQq7rGp4N7p").body)
monitors += response.as_a
rescue ex
error_message ||= ex.message
puts "Error pulling monitors: #{error_message}"
puts "Error pulling monitors: #{ex.message}"
break
end