@@ -85,7 +85,7 @@ pub(crate) trait ErasedConnectHandler<A: Adapter>: Send + Sync + 'static {
85
85
/// * See the [`extract`](super::extract) module doc for more details on available extractors.
86
86
pub trait FromConnectParts < A : Adapter > : Sized {
87
87
/// The error type returned by the extractor
88
- type Error : std:: error:: Error + ' static ;
88
+ type Error : std:: error:: Error + Send + ' static ;
89
89
90
90
/// Extract the arguments from the connect event.
91
91
/// If it fails, the handler is not called
@@ -350,10 +350,10 @@ macro_rules! impl_middleware_async {
350
350
$(
351
351
let $ty = match $ty:: from_connect_parts( & s, & auth) {
352
352
Ok ( v) => v,
353
- Err ( _e ) => {
353
+ Err ( e ) => {
354
354
#[ cfg( feature = "tracing" ) ]
355
- tracing:: error!( "Error while extracting data: {}" , _e ) ;
356
- return Ok ( ( ) ) ;
355
+ tracing:: error!( "Error while extracting data: {}" , e ) ;
356
+ return Err ( Box :: new ( e ) as _ ) ;
357
357
} ,
358
358
} ;
359
359
) *
@@ -387,12 +387,10 @@ macro_rules! impl_middleware {
387
387
$(
388
388
let $ty = match $ty:: from_connect_parts( & s, & auth) {
389
389
Ok ( v) => v,
390
- Err ( _e ) => {
390
+ Err ( e ) => {
391
391
#[ cfg( feature = "tracing" ) ]
392
- tracing:: error!( "Error while extracting data: {}" , _e) ;
393
-
394
- //TODO: handle error
395
- return Ok ( ( ) ) ;
392
+ tracing:: error!( "Error while extracting data: {}" , e) ;
393
+ return Err ( Box :: new( e) as _) ;
396
394
} ,
397
395
} ;
398
396
) *
0 commit comments