From 3a8481e4533ae49b22dbad5847a5a19fcee9b57f Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Sat, 19 Oct 2019 16:20:28 -0400 Subject: [PATCH] Fix error handling for uptime monitors --- src/instances.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/instances.cr b/src/instances.cr index 6def7af..f96f041 100644 --- a/src/instances.cr +++ b/src/instances.cr @@ -46,7 +46,7 @@ spawn do break end rescue ex - error_message = response.try &.["errorStats"]? + error_message = response.try &.as?(String).try &.["errorStats"]? error_message ||= ex.message puts "Exception pulling monitors: #{error_message}" break