Fork me on GitHub
#luminus
<
2020-04-07
>
eric.shao02:04:41

Hello. How to setup retitit-swagger to group APIs under different group names? Is there a piece of code sample? THX!😊

sudakatux12:04:58

So often when i get an exception

sudakatux12:04:21

{
  "type": "exception",
  "class": ".IOException"
}

sudakatux12:04:32

How can i see the full stacktrace

sudakatux12:04:51

the exception doesnt seem to be printed in the logs

sudakatux12:04:09

It is kind of hard to know what happened or where

ikitommi15:04:59

reitit doesn’t log by default and hides extra info from clients for security reasons, will change that in 1.0.0.

ikitommi15:04:28

for now, you can swap the default excepton-mw to:

(exception/create-exception-middleware
  (merge
    exception/default-handlers
    {::exception/wrap (fn [handler ^Exception e request]
                        (log/error e (.getMessage e))
                        (handler e request))}))

ikitommi15:04:46

e.g. “wrap all exception handlers with a code that logs the error”