1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-22 05:35:08 +02:00

use actix_web::Error for middleware errors

This commit is contained in:
Nikolay Kim
2019-03-10 16:35:38 -07:00
parent 79875ea039
commit 4d96abb639
13 changed files with 305 additions and 85 deletions

View File

@@ -193,7 +193,7 @@ where
{
type Request = (T, HttpRequest);
type Response = ServiceResponse;
type Error = ();
type Error = Error;
type InitError = ();
type Service = AsyncHandlerService<F, T, R>;
type Future = FutureResult<Self::Service, ()>;
@@ -227,7 +227,7 @@ where
{
type Request = (T, HttpRequest);
type Response = ServiceResponse;
type Error = ();
type Error = Error;
type Future = AsyncHandlerServiceResponse<R::Future>;
fn poll_ready(&mut self) -> Poll<(), Self::Error> {
@@ -255,7 +255,7 @@ where
T::Error: Into<Error>,
{
type Item = ServiceResponse;
type Error = ();
type Error = Error;
fn poll(&mut self) -> Poll<Self::Item, Self::Error> {
match self.fut.poll() {