I am currently trying to port an existing REST API...
# http4k
m
I am currently trying to port an existing REST API to http4k. Is it possible to customize the 400 error response when using contract? It seems like
CatchLensFailure
filter is not used. Now I get:
Copy code
{
  "message": "Missing/invalid parameters",
  "params": [
    {
      "name": "body",
      "type": "body",
      "datatype": "object",
      "required": true,
      "reason": "Invalid"
    }
  ]
}
I would need:
Copy code
{
  "error": "..."
}
Since existing clients assume that.
d
you can do this, but you need to drop down to using the main OpenApi3 constructor and overri
Copy code
private val errorResponseRenderer: ErrorResponseRenderer = JsonErrorResponseRenderer(json),