reitit

Alon Melanker 2025-03-13T13:37:52.703019Z

Hi all, I’m using Reitit and want to log response schema mismatches without modifying the original response sent back to the client. Currently, whenever the response fails schema validation, Reitit returns its own error instead. I’ve written a custom middleware that logs the error and returns the original response, but I’m wondering if there’s a more straightforward or built-in way to accomplish this. Any suggestions?

Kirill Chernyshov 2025-03-13T13:59:43.962419Z

you have to rewrite [coerce-response-middleware](https://github.com/metosin/reitit/blob/master/modules/reitit-ring/src/reitit/ring/coercion.cljc#L47-L68) to adapt to your usecase

👍 1