1
0
mirror of https://github.com/actix/examples synced 2025-02-17 07:23:29 +01:00

updated basics example to return 500 statuscode for /error request

This commit is contained in:
dowwie 2018-04-17 13:55:49 -04:00
parent 447ee25869
commit 911386d5c8

View File

@ -106,7 +106,7 @@ fn main() {
})) }))
.resource("/error", |r| r.f(|req| { .resource("/error", |r| r.f(|req| {
error::InternalError::new( error::InternalError::new(
io::Error::new(io::ErrorKind::Other, "test"), StatusCode::OK) io::Error::new(io::ErrorKind::Other, "test"), StatusCode::INTERNAL_SERVER_ERROR)
})) }))
// static files // static files
.handler("/static", fs::StaticFiles::new("static")) .handler("/static", fs::StaticFiles::new("static"))