Display the target class on JSON parsing error.

rewrite
Karchnu 2020-10-14 17:02:06 +02:00
parent 624289a112
commit 9a921b6ac7
1 changed files with 1 additions and 0 deletions

View File

@ -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