From 9a921b6ac73935e33afe9aebb8357a2f482b0714 Mon Sep 17 00:00:00 2001 From: Karchnu Date: Wed, 14 Oct 2020 17:02:06 +0200 Subject: [PATCH] Display the target class on JSON parsing error. --- src/main.cr | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.cr b/src/main.cr index b48fd67..68f73f4 100644 --- a/src/main.cr +++ b/src/main.cr @@ -635,6 +635,7 @@ class AuthD::Service rescue e : MalformedRequest Baguette::Log.error "#{e.message}" Baguette::Log.error " .. type was: #{e.ipc_type}" + Baguette::Log.error " .. tried class was: #{Request.requests.find(&.type.==(e.ipc_type)).to_s}" Baguette::Log.error " .. payload was: #{e.payload}" response = Response::Error.new e.message rescue e