Radish alpha
r
Radicle web interface
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 cb1e7f361d500c0da6bb2065a7d31605dcbe8d56
parent c1a026fc815ef710a7db6f08ea35c080a5894fca
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,