You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Emit error events and return errors in client error handlers
Update handle_get_info_error and handle_buy_error to:
- Emit GetInfoFailed and BuyRequestFailed events to notify users
- Return LightningError instead of Ok() to properly signal failures
- Use the actual error parameter instead of ignoring it
This ensures consistent error handling behavior across LSPS implementations.
"Received get_info error response for request {:?}: {:?}",
262
+
request_id, error
263
+
),
264
+
action:ErrorAction::IgnoreAndLog(Level::Error),
265
+
})
253
266
},
254
267
None => {
255
268
returnErr(LightningError{err:format!("Received error response for a get_info request from an unknown counterparty ({:?})",counterparty_node_id),action:ErrorAction::IgnoreAndLog(Level::Info)});
"Received buy error response for request {:?}: {:?}",
348
+
request_id, error
349
+
),
350
+
action:ErrorAction::IgnoreAndLog(Level::Error),
351
+
})
326
352
},
327
353
None => {
328
354
returnErr(LightningError{err:format!("Received error response for a buy request from an unknown counterparty ({:?})", counterparty_node_id),action:ErrorAction::IgnoreAndLog(Level::Info)});
0 commit comments