Tech
03/10/2024, 12:58 AMTech
03/10/2024, 2:36 PMrouting {}
scope and simply throwing a not found exception.
When an invalid route is used it automatically returns HTTP 404 then my statuses
block in StatusPages
also picks it up which sends back two HTTP requests in the pipeline (to my understanding)
route("{...}") {
handle { throw ResourceNotFoundException() }
}
Aleksei Tirman [JB]
03/11/2024, 7:37 AMTech
03/11/2024, 3:02 PMAleksei Tirman [JB]
03/12/2024, 8:09 AMembeddedServer(Netty, port = 8082) {
install(StatusPages) {
status(HttpStatusCode.NotFound) { call, _ ->
call.respondText { "NOT FOUND" }
}
}
routing {
}
}.start(true)
Aleksei Tirman [JB]
03/12/2024, 8:10 AM<http://localhost:8082/test>
request.Tech
03/12/2024, 12:45 PMAleksei Tirman [JB]
03/13/2024, 8:05 AMTech
03/13/2024, 10:54 PMTech
03/13/2024, 10:55 PMAlex J.
03/20/2024, 4:52 AM