File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
crates/nostr-sdk/src/relay Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ use std::time::Instant;
18
18
#[ cfg( not( target_arch = "wasm32" ) ) ]
19
19
use async_utility:: futures_util:: stream:: AbortHandle ;
20
20
use async_utility:: { futures_util, thread, time} ;
21
+ use nostr:: message:: relay:: NegentropyErrorCode ;
21
22
use nostr:: message:: MessageHandleError ;
22
23
use nostr:: negentropy:: hex;
23
24
use nostr:: negentropy:: { self , Bytes , Negentropy } ;
@@ -96,6 +97,9 @@ pub enum Error {
96
97
/// Filters empty
97
98
#[ error( "filters empty" ) ]
98
99
FiltersEmpty ,
100
+ /// Reconciliation error
101
+ #[ error( "negentropy reconciliation error: {0}" ) ]
102
+ NegentropyReconciliation ( NegentropyErrorCode ) ,
99
103
}
100
104
101
105
/// Relay connection status
@@ -1637,8 +1641,7 @@ impl Relay {
1637
1641
code,
1638
1642
} => {
1639
1643
if subscription_id == sub_id {
1640
- tracing:: error!( "Negentropy syncing error: {code}" ) ;
1641
- break ;
1644
+ return Err ( Error :: NegentropyReconciliation ( code) ) ;
1642
1645
}
1643
1646
}
1644
1647
_ => ( ) ,
You can’t perform that action at this time.
0 commit comments