module.web
module.web copied to clipboard
Fix #8 unhandled exception when parsing malformed body
This is just a preview, I want to sure about the code before writting tests.
Thanks for the update! There's still a couple of issues:
- We shouldn't specify the default handler function in both the module and the middleware.
- The handler function you've added isn't a valid Ring handler function.
Instead, attach the Muuntaja error and content type as namespaced keys onto the request map (e.g. :muuntaja/error and muuntaja/content-type), and remove the default error handler. If the error handler is missing, don't wrap the exception and allow it to be thrown.
@weavejester thanks for feedback. Sorry for a long running PR, but I've been really busy in last weeks. I expect I will finish it soon.