-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simple error interceptor giving an empty response #152
Comments
Konrad, You are returning a response map when you need to return a context map. The {:response {:status 500 :body ... :headers ... }} Tim- On Tue, Jul 23, 2013 at 4:32 PM, Konrad Scorciapino <
|
Hi, Tim! Thanks for the response! Is it enough to have only the :response key on this map, though? I'm still getting a blank response with {:response {:status ... :body ... :headers ...}} |
Konrad, You should assoc your response into the context passed to the error fn. Tim- On Tue, Jul 23, 2013 at 6:08 PM, Konrad Scorciapino <
|
Thanks! This fixed the problem!! |
Here's my first attempt of a catcher interceptor on Pedestal:
As I could test, by adding (/ 1 0) to my code, the function does get called, but the client gets an empty response with status 200, instead of the response in the map. I wonder why it is so.
There is nothing fancy in my routes variable:
The text was updated successfully, but these errors were encountered: