404 if no tenant if found

Signed-off-by: Alex Chi Z <chi@neon.tech>
This commit is contained in:
Alex Chi Z
2025-07-16 17:07:49 -04:00
parent 77271bca07
commit 7d4eb50d48

View File

@@ -4815,6 +4815,12 @@ impl Service {
}
}
if targets.is_empty() {
return Err(ApiError::NotFound(
anyhow::anyhow!("Tenant {tenant_id} not found").into(),
));
}
Ok(TenantShardAttachState {
targets,
by_node_id,