Skip to content

Commit

Permalink
print error and continue if service id not found
Browse files Browse the repository at this point in the history
  • Loading branch information
rcgoodfellow committed Oct 3, 2023
1 parent 5f84818 commit 1e9179b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions dev-tools/omdb/src/bin/omdb/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1201,10 +1201,19 @@ async fn cmd_db_eips(
for ip in &ips {
let owner = if let Some(owner_id) = ip.parent_id {
if ip.is_service {
let service = LookupPath::new(opctx, datastore)
let service = match LookupPath::new(opctx, datastore)
.service_id(owner_id)
.fetch()
.await?;
.await
{
Ok(instance) => instance,
Err(e) => {
eprintln!(
"error looking up service with id {owner_id}: {e}"
);
continue;
}
};
Owner::Service { kind: format!("{:?}", service.1.kind) }
} else {
use db::schema::instance::dsl as instance_dsl;
Expand Down

0 comments on commit 1e9179b

Please sign in to comment.