graphql

erwinrooijakkers 2019-08-15T08:56:40.023300Z

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

erwinrooijakkers 2019-08-15T08:58:30.024600Z

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)
    (http-response/internal-server-error
     {:error "Oops! We have been notified."})))

2019-08-15T11:32:15.028400Z

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.

hlship 2019-08-15T15:36:11.029300Z

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.