Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
httpd: Don't panic when node is not running
Browse files Browse the repository at this point in the history
  • Loading branch information
rudolfs authored and cloudhead committed Nov 2, 2023
1 parent d8f8d29 commit 342b05f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion radicle-httpd/src/api/v1/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 342b05f

Please sign in to comment.