You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Uncaught exception when a request body is not valid e.g. JSON #8
I found that a usage of muuntaja.middleware/wrap-format is used in duct.middleware.web/format component without wrapping it into muuntaja.middleware/wrap-exception thus when a request body contains invalid JSON an exception is raised and couldn't be caught.
Activity
weavejester commentedon May 21, 2018
I think this is a good idea, though as you mention, the best way forward would be to allow developers to define their own handler through an option.
Do we know that an exception will only be raised if the content is malformed?
LukasRychtecky commentedon May 21, 2018
It's recommended by Muuntaja https://github.com/metosin/muuntaja/blob/8e59542c5e557467de2d0018610c0d0a38d01e87/src/clj/muuntaja/middleware.clj#L17 (it checks for a type of an exception).
Fix duct-framework#8 unhandled exception when parsing malformed body
Fix duct-framework#8 unhandled exception when parsing malformed body
Fix duct-framework#8 unhandled exception when parsing malformed body
Fix duct-framework#8 unhandled exception when parsing malformed body
Fix duct-framework#8 unhandled exception when parsing malformed body