Fork me on GitHub
#pedestal
<
2019-12-04
>
Mehdi H.07:12:15

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.11:12:12

Never mind, I found the problem in the code