reitit

https://cljdoc.org/d/metosin/reitit/ https://github.com/metosin/reitit/
Ben Sless 2021-04-18T15:02:30.113900Z

Hi all, I'm using malli for coercion and sieppari. When requests fail validation the returned body contains the schema and a list of errors. If I wanted to only return the humanized error message, what would be the best way? An interceptor with :leave or is there something slightly more convenient?

bartuka 2021-04-19T14:01:50.114500Z

when you create the coercion using reitit.coercion.malli/create there is a :error-keys options that defaults to :error-keys #{:type :coercion :in :schema :value :errors :humanized #_:transformed} I haven't tested, but I believe if you leave only :humanized here it should work

Ben Sless 2021-04-19T14:15:08.116700Z

thank you! I'll check it out

👍 1