mirror of
https://github.com/actix/examples
synced 2024-11-30 17:14:35 +01:00
Merge pull request #5 from Dowwie/master
updated basics example to return 500 statuscode for /error request
This commit is contained in:
commit
c057da6329
@ -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"))
|
||||||
|
Loading…
Reference in New Issue
Block a user