Skip to content

Commit ef34f9e

Browse files
committed
Panic with correct error when port cannot be bound
1 parent a382410 commit ef34f9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/graphql.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ pub async fn serve_graphql(db: &Path, opts: ServeOptions) {
7777
.layer(Extension(schema));
7878
let listener = TcpListener::bind(addr)
7979
.await
80-
.unwrap_or_else(|_| panic!("Port {:?} in use", addr));
80+
.unwrap_or_else(|e| panic!("Could not listen on {:?}:{}: {e}", addr.0, addr.1));
8181
axum::serve(listener, app)
8282
.await
8383
.expect("Can't serve graphql endpoint");

0 commit comments

Comments
 (0)