mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-10 03:13:33 +02:00
Better reflect failure UI
This commit is contained in:
@@ -29,10 +29,11 @@ pub struct MethodDefinition {
|
||||
pub server_streaming: bool,
|
||||
}
|
||||
|
||||
pub async fn reflect(uri: &Uri) -> Vec<ServiceDefinition> {
|
||||
let (pool, _) = fill_pool(uri).await;
|
||||
pub async fn reflect(uri: &Uri) -> Result<Vec<ServiceDefinition>, String> {
|
||||
let (pool, _) = fill_pool(uri).await?;
|
||||
|
||||
pool.services()
|
||||
Ok(pool
|
||||
.services()
|
||||
.map(|s| {
|
||||
let mut def = ServiceDefinition {
|
||||
name: s.full_name().to_string(),
|
||||
@@ -53,5 +54,5 @@ pub async fn reflect(uri: &Uri) -> Vec<ServiceDefinition> {
|
||||
}
|
||||
def
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
.collect::<Vec<_>>())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user