diff --git a/cli/src/commands/serve_web.rs b/cli/src/commands/serve_web.rs index 2181c6339a4..7f200d4341f 100644 --- a/cli/src/commands/serve_web.rs +++ b/cli/src/commands/serve_web.rs @@ -120,6 +120,7 @@ pub async fn serve_web(ctx: CommandContext, mut args: ServeWebArgs) -> Result SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), args.port), }; + let builder = Server::try_bind(&addr).map_err(CodeError::CouldNotListenOnInterface)?; let mut listening = format!("Web UI available at http://{}", addr); if let Some(ct) = args.connection_token { @@ -127,7 +128,7 @@ pub async fn serve_web(ctx: CommandContext, mut args: ServeWebArgs) -> Result