Fork me on GitHub

Is there a way to add an exception handler to Lacinia Pedestal?


Want to catch exception and log to Sentry. E.g.,

(def sentry-error-handler
  (fn [^Exception e _]
    (log/info e (.getMessage e))
    (sentry-capture e)
     {:error "Oops! We have been notified."})))


I did configure sentry in a way that it logs all exceptions, I think it is easier if we are not allowed to forget to send to sentry.


It's out of scope for us to discuss Pedestal here, but lacinia-pedestal is designed to make it easy to inject your own interceptors into its Pedestal interceptor pipeline, so you can decide for yourself how to handle exceptions.