aboutsummaryrefslogtreecommitdiff
path: root/src/guff/api-handler.cr
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2016-03-08 00:45:14 -0500
committerPaul Duncan <pabs@pablotron.org>2016-03-08 00:45:14 -0500
commit5bea72753a2afbaaedbed1538d44e1c1b586917a (patch)
treed7741edd5f84c9a4305e5435b0b70731a61825c6 /src/guff/api-handler.cr
parent172304157f582a99fd2bba32fad7ed1018bf0b49 (diff)
downloadold-guff-5bea72753a2afbaaedbed1538d44e1c1b586917a.tar.bz2
old-guff-5bea72753a2afbaaedbed1538d44e1c1b586917a.zip
better api error handling
Diffstat (limited to 'src/guff/api-handler.cr')
-rw-r--r--src/guff/api-handler.cr5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/guff/api-handler.cr b/src/guff/api-handler.cr
index 5327949..19b6aa5 100644
--- a/src/guff/api-handler.cr
+++ b/src/guff/api-handler.cr
@@ -122,6 +122,11 @@ module Guff
],
})
rescue e
+ # log backtrace
+ # FIXME
+ puts e.inspect_with_backtrace
+
+ # return error to user
{ "error": e.to_s }.to_json
end