This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-12-21
Channels
- # beginners (201)
- # boot (125)
- # cider (3)
- # cljs-dev (21)
- # cljsrn (165)
- # clojars (8)
- # clojure (332)
- # clojure-belgium (1)
- # clojure-gamedev (8)
- # clojure-russia (75)
- # clojure-spec (25)
- # clojure-uk (96)
- # clojurebridge (2)
- # clojurescript (130)
- # code-reviews (16)
- # cursive (26)
- # datomic (20)
- # devops (6)
- # emacs (6)
- # hoplon (90)
- # jobs (9)
- # luminus (2)
- # off-topic (4)
- # om (65)
- # onyx (5)
- # pedestal (4)
- # protorepl (6)
- # re-frame (34)
- # reagent (12)
- # ring (4)
- # ring-swagger (7)
- # specter (2)
- # test-check (8)
- # untangled (2)
- # vim (1)
- # yada (6)
Is there a straight forward way to use Exceptions for 400
responses? i.e. can my handler fn throw some special "client error" type exception, and the response will be a 400
, with a body I specify, and not a 500
server error?
Yes. Throw a ex-info with :status and :body in the ex-data map
Thanks @malcolmsparks. I thought I had tried that, but it might be something specific with my setup that's mangling it somewhere along the way.
Good idea to look at the code for the return interceptor.
@nha thanks for reporting. The last release is a work in progress - I thought I'd done rnough to release without breaking anything -