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))Look at the exception middleware and its default case, that's just what you need
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