Closed
Description
When I do http://localhost:8080/my/dassda , I want to see a bad request, but I get I received 0
. Revision I use is be025c9. Is there a way to handle bad params?
@Path("{iii}")
data class MyParam(@PathParam("I'm int") val iii: Int)
route("my") {
throws(
status = HttpStatusCode.BadRequest,
example = "bad request",
exClass = Throwable::class
) {
get<MyParam, String> { param ->
respond("I received ${param.iii}")
}
}
}
Metadata
Metadata
Assignees
Labels
No labels