Jörg Winter
04/01/2020, 10:42 AMTry is deprecated.. is the new 'pattern' to handle exceptions this
Either.catch { call.receive<ModelCreateDto>() }.fold({
// handle ktor serialization exceptions... Try is deprecated
call.respond(HttpStatusCode.BadRequest, "invalid email")
})
{
// ...success case
}
...or is there some other (somewhat simpler) alternative ?