mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-16 03:40:37 +08:00
httpd: Don't panic when node is not running
This commit is contained in:
@@ -26,7 +26,13 @@ async fn node_handler(State(ctx): State<Context>) -> impl IntoResponse {
|
||||
} else {
|
||||
"stopped"
|
||||
};
|
||||
let config = node.config()?;
|
||||
let config = match node.config() {
|
||||
Ok(config) => Some(config),
|
||||
Err(err) => {
|
||||
tracing::error!("Error getting node config: {:#}", err);
|
||||
None
|
||||
}
|
||||
};
|
||||
let response = json!({
|
||||
"id": node_id.to_string(),
|
||||
"config": config,
|
||||
|
||||
Reference in New Issue
Block a user