Hi just a big :thumbsup: :thumbsup: guys for thin...
# http4k
r
Hi just a big 👍 👍 guys for thinking about everything... at work a requirement was to give detailed mapping errors of bodies failure... as I was using a ContractRoute with default error handling I was just getting an standard error: "Invalid body should be an object" which was not enough. Poking around I found the
preFlightExtraction
in parameter in the
meta
tag which is quite great as it can disable the checks of lens on the contract level and lets you handle the LensFailure exception when you use the lens. So that saved my day. Then while I was going through how the OpenApi render is done, I saw that you even thought about letting the
errorReponseRenderer
as a parameter to the constructor. So it's even easier to providing my custom ErrorResponseRender that tries to make sens of Jackson exceptions, to provide the required parameters. So thank you thinking about different use cases and providing so many setting to answer to different (sometimes dumb) requirements !
👍 1
d
Thanks! But I assure you that as Http4k is 4 years old, we’ve probably come across most of the dumb requirements already! 🤣