feat: throw initialize error detail (#192)

This commit is contained in:
4t145 2025-05-19 09:41:56 +08:00 • committed by GitHub
commit 817e62d895
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -327,7 +327,10 @@ impl StreamableHttpServer {
let service = service_provider();
let ct = self.config.ct.child_token();
tokio::spawn(async move {
let server = service.serve_with_ct(transport, ct).await?;
let server = service
.serve_with_ct(transport, ct)
.await
.map_err(tokio::io::Error::other)?;
server.waiting().await?;
tokio::io::Result::Ok(())
});