main.rs: Add comment about better error handling

pull/8/head
Tristan Daniël Maat 2022-09-16 17:22:46 +01:00
parent b653d3a3f6
commit 20a6291ac9
Signed by: tlater
GPG Key ID: 49670FD774E43268
1 changed files with 4 additions and 0 deletions

View File

@ -60,6 +60,10 @@ async fn main() -> std::io::Result<()> {
HttpServer::new(move || {
App::new()
.wrap(middleware::NormalizePath::trim())
// TODO(tlater): When actix-web 4.3 releases, this can be improved a
// lot because of this PR:
//
// https://github.com/actix/actix-web/pull/2784
.wrap(
ErrorHandlers::new()
.handler(StatusCode::NOT_FOUND, generic_error)