Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
httpd: Don't panic when node is not running
Rūdolfs Ošiņš committed 2 years ago
commit 342b05f88d0ab9e81b03db9427b1d641cc5cb749
parent d8f8d296057828b90ade8b875e121a0831f7dc43
1 file changed +7 -1
modified radicle-httpd/src/api/v1/node.rs
@@ -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,