luminus

eric.shao 2020-04-07T02:42:41.007600Z

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

sudakatux 2020-04-07T12:06:58.007900Z

So often when i get an exception

sudakatux 2020-04-07T12:07:16.008100Z

I just see

sudakatux 2020-04-07T12:07:21.008400Z

{
  "type": "exception",
  "class": "<http://java.io|java.io>.IOException"
}

sudakatux 2020-04-07T12:07:32.008700Z

How can i see the full stacktrace

sudakatux 2020-04-07T12:07:51.009100Z

the exception doesnt seem to be printed in the logs

sudakatux 2020-04-07T12:08:09.009600Z

It is kind of hard to know what happened or where

ikitommi 2020-04-07T15:47:59.012Z

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

ikitommi 2020-04-07T15:48:28.012500Z

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))}))

ikitommi 2020-04-07T15:48:46.012900Z

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