Type Definition aitch::Error [−][src]
type Error = Box<StdError + Send + Sync>;
A generic error type for aitch handlers and middlewares.
An error type of Box<std::error::Error>
is used, so that the error type is as generic as possible
and can be passed through layers of third-party handlers and middlewares.
In most cases, handlers and middlewares should aim to handle their own errors (and return an appropriate HTTP response). Returning an error from a handler should be an exceptional circumstance, and will most likely (depending on the middleware/server in use) result in a generic HTTP 500 error page.