Skip to content

Commit

Permalink
500 response takes an exception object
Browse files Browse the repository at this point in the history
  • Loading branch information
dakrone committed Nov 16, 2012
1 parent a615827 commit d9fb254
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/eisago/api.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d9fb254

Please sign in to comment.