Better gRPC reflection errors

This commit is contained in:
Gregory Schier
2024-06-18 10:54:39 -07:00
parent 5cdcbc8dce
commit f81ffe249e
3 changed files with 27 additions and 5 deletions

View File

@@ -134,6 +134,12 @@ async fn cmd_grpc_reflect(
let req = get_grpc_request(&window, request_id)
.await
.map_err(|e| e.to_string())?;
// Short-circuit if no URL is set
if req.url.is_empty() {
return Ok(Vec::new());
}
let uri = safe_uri(req.url.as_str());
if proto_files.len() > 0 {
grpc_handle