This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-03-06
Channels
- # babashka (60)
- # beginners (36)
- # clj-kondo (29)
- # clojure (91)
- # clojure-dev (18)
- # clojure-europe (12)
- # clojure-nl (1)
- # clojure-norway (11)
- # clojure-uk (5)
- # clojuredesign-podcast (8)
- # clojurescript (40)
- # core-typed (74)
- # data-science (8)
- # datomic (9)
- # emacs (22)
- # events (5)
- # fulcro (56)
- # gratitude (3)
- # hyperfiddle (11)
- # lsp (6)
- # malli (36)
- # meander (23)
- # off-topic (50)
- # polylith (4)
- # portal (10)
- # reitit (4)
- # schema (1)
- # shadow-cljs (66)
- # squint (3)
- # tools-deps (16)
hey all, I'm using reitit
in my clj app (using ring
)
how can I send the full stacktrace in the response and log it when an exception is thrown?
currently only the name of the exception is thrown and it's missing a lot of debugging valuable data
def router
(ring/ring-handler
(ring/router
["/api" ...]
{:data {:middleware [exception/exception-middleware]}})
(ring/create-default-handler))
I have added the default middleware
{:data {:middleware [exception/exception-middleware]}})
but it return just a small portion of the exception (also documented like this)You want to use the create exception middleware and override the default handler https://github.com/metosin/reitit/blob/master/modules/reitit-middleware/src/reitit/ring/middleware/exception.clj#L119
👍 1