Stanislav Kral
12/26/2020, 7:11 PMcall.receive<T>()
?
Currently my server returns 500 Internal Server Error
, I would like to return 400 Bad Request
in some general reusable fashion. I can't seem to find any resources regarding this topic, Thanks!sultanofcardio
12/26/2020, 7:16 PMinstall(StatusPages) {
exception<Exception> { cause ->
call.respond(HttpStatusCode.BadRequest)
}
}
Stanislav Kral
12/26/2020, 7:25 PMchristophsturm
12/27/2020, 9:29 AMLaurence
12/27/2020, 12:55 PMinstall(StatusPages) {
exception<JsonSyntaxException> {
call.respond(HttpStatusCode.BadRequest, Error(it.message))
}
}