From d17f3dc4bb7d9e0f7433055d9106abfaba666788 Mon Sep 17 00:00:00 2001 From: Mia Bennett Date: Tue, 18 Jun 2024 15:34:03 +0930 Subject: [PATCH] refactor(events): [PPT-1390] improve debug logging --- src/controllers/events.cr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/controllers/events.cr b/src/controllers/events.cr index 2cec9db..94934f5 100644 --- a/src/controllers/events.cr +++ b/src/controllers/events.cr @@ -1075,7 +1075,8 @@ class Events < Application begin event = client.get_event(user.email, id: event_id, calendar_id: cal_id) - rescue PlaceCalendar::Exception + rescue ex : PlaceCalendar::Exception + Log.debug { "upstream failed to find event #{event_id}, status: #{ex.http_status}, body: #{ex.http_body}" } event = nil end raise Error::NotFound.new("failed to find event #{event_id} searching on #{cal_id} as #{user.email}") unless event