pedestal

Mehdi H. 2019-12-04T07:42:15.115700Z

Hi everyone! I can't seem to be able to catch errors thrown using Pedestal. I have a transaction function to Datomic that throws a clojure.lang.ExceptionInfo exception in the datomic on-prem transactor, which, according to Datomic documention, should also be thrown in the peer, so in my case through the database interceptor that tries to transact the faulty data. None of my interceptors have an :error function, but I have used io.pedestal.interceptor.error/error-dispatch to catch the errors at the end of the process. It does not seem to work. • Does an interceptor need its :enter function to be used on the request to have its :error function used on the way out? • If so what is the proper way to user error-dispatch (the resulting interceptor is the first in the route) • any other thoughts as to why I am not catching it (it's a POST request and it returns 201 created even if it didn't happen...) Thanks!

Mehdi H. 2019-12-04T11:18:12.116100Z

Never mind, I found the problem in the code