Skip to content

Conversation

@potomak
Copy link

@potomak potomak commented Apr 4, 2013

No description provided.

@knutin
Copy link
Owner

knutin commented Apr 4, 2013

I'm a bit reluctant to a catch-all in the middleware, as this makes it tricky to call the handle_event/3 callbacks for request_{exception,error,exit}. An option would be to call it from the middleware explicitly.

I will have to think about it for a bit.. :-)

This is the easiest and maybe the worst solution but it solves the problem
of missing calls to handle_event/3 request_{throw,error,exit}.
@potomak
Copy link
Author

potomak commented Apr 4, 2013

While you were thinking I've tried to solve the problem in the easiest way 😁

Notes:

  • this pull request solves the problem of missing postprocess call for error requests (was it a problem to solve?)
  • the way I've tested handle_event/3 callback is primitive, I'd really like to see how you would achieve this task
  • this solution highlights problems of handling middlewares with a plain elli handler, it's elegant, but there should be a better way to do it

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

Successfully merging this pull request may close these issues.

2 participants