Skip to content
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

clojure.lang.ExceptionInfo: clojure.lang.ArityException in Interceptor :muuntaja.interceptor/exceptions - Wrong number of args (2) passed to: interceptor/exception-interceptor/fn--23252 #91

Closed
mynomoto opened this issue Nov 22, 2018 · 1 comment

Comments

@mynomoto
Copy link

The function on the error handler on muuntaja.interceptor/exception-interceptor should accept two arguments instead of one as per http://pedestal.io/reference/error-handling#_error_function
I think this is a difference of implementation between pedestal and sieppari so the tests did not catch that.

@ikitommi
Copy link
Member

Hi. At 0.6.0 we decided to move from pure pedestal-based interceptor model to Sieppari-based model. Will update the README accordingly.

We are trying to push a common interceptor spec, like ring-spec, which would help to create a larger ecosystem for Clojure. There is #interceptors channell in Slack to discuss about these.

For pedestal, two options:

  1. use the pedestal exception handling to handle Muuntaja exceptions
  2. let's create thin wrapper pedestalify that wraps a Sieppari-style interceptors (:error, which is the only difference) into Pedestal-style interceptors

https://github.com/metosin/muuntaja/blob/master/CHANGELOG.md#060-392018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants