If you want to customise the bad request message, ...
# http4k
d
If you want to customise the bad request message, you'll need to manually configure your OpenApi3 (presumably you're using that?) to use a custom
ErrorResponseRenderer
, using this constructor:
Copy code
class OpenApi3<NODE : Any>(
    private val apiInfo: ApiInfo,
    private val json: Json<NODE>,
    private val extensions: List<OpenApiExtension> = emptyList(),
    private val apiRenderer: ApiRenderer<Api<NODE>, NODE> = OpenApi3ApiRenderer(json),
    private val securityRenderer: SecurityRenderer = OpenApi3SecurityRenderer,
    private val errorResponseRenderer: ErrorResponseRenderer = JsonErrorResponseRenderer(json)
)