Permalink
Browse files

500 response takes an exception object

  • Loading branch information...
1 parent a615827 commit d9fb254229ecac356992574870768b9922b2df2f @dakrone committed Nov 16, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/eisago/api.clj
View
@@ -12,9 +12,10 @@
(defn error
"Response for API 500 errors"
- [req]
+ [req ex]
{:status 500 :body (json/encode {:status 500
- :message "There was an unknown error"})})
+ :message "There was an error"
+ :error (.getMessage ex)})})
(defn search
"API implementation of searching, lib and namespace can be optionally

0 comments on commit d9fb254

Please sign in to comment.