Fork me on GitHub
#pedestal
<
2017-03-29
>
souenzzo12:03:31

Pedestal team, there is the function that takes the exception + context and returns the exception with :exception-type ... and other things that appears magically on error interceptor?

ddeaguiar13:03:25

As per the doc-string of the `error-dispatch macro https://github.com/pedestal/pedestal/blob/master/interceptor/src/io/pedestal/interceptor/error.clj#L17 > Pedestal wraps all exceptions in ex-info on error, providing the following keys to match on: :execution-id, :stage, :interceptor, :exception-type

ddeaguiar13:03:53

You can use that macro to create error handling interceptors

souenzzo13:03:38

I'm doing a unit test on the error handler (to ensure that ex-x generates response y). I wanted to see how the "context" (stage, type) is injected into the exception.

souenzzo16:03:15

Someone else using https://github.com/MichaelDrogalis/dire to "overwrite" transactions exceptions? They are really odd to catch