module.web icon indicating copy to clipboard operation
module.web copied to clipboard

Fix #8 unhandled exception when parsing malformed body

Open LukasRychtecky opened this issue 7 years ago • 2 comments

This is just a preview, I want to sure about the code before writting tests.

LukasRychtecky avatar May 21 '18 18:05 LukasRychtecky

Thanks for the update! There's still a couple of issues:

  1. We shouldn't specify the default handler function in both the module and the middleware.
  2. 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 avatar Sep 08 '18 11:09 weavejester

@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.

LukasRychtecky avatar Sep 10 '18 11:09 LukasRychtecky