summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorSerguey Parkhomovsky <xindigo@gmail.com>2026-03-21 11:46:19 -0700
committerSerguey Parkhomovsky <xindigo@gmail.com>2026-03-21 11:46:19 -0700
commit54716d737ac4a84eeb65e1c41a4c3096c5dbc4c2 (patch)
tree0549d72eb67df4e2c763a2cbdda14c993697c567 /src/main.rs
parentea7307674cfdc630785da43c97213c8c774f3f36 (diff)
unwrap_or_else on axum serve
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 424df39..8018bed 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -99,7 +99,10 @@ async fn main() {
process::exit(1);
});
info!(addr = %args.bind, "Listening");
- axum::serve(listener, app).await.unwrap();
+ axum::serve(listener, app).await.unwrap_or_else(|e| {
+ error!(error = %e, "HTTP server error");
+ process::exit(1);
+ });
}
async fn fetch_prusa(