diff --git a/nexus/db-queries/src/db/datastore/external_ip.rs b/nexus/db-queries/src/db/datastore/external_ip.rs index 2d2b41fd24..e821082501 100644 --- a/nexus/db-queries/src/db/datastore/external_ip.rs +++ b/nexus/db-queries/src/db/datastore/external_ip.rs @@ -210,8 +210,8 @@ impl DataStore { let name = data.name().clone(); let explicit_ip = data.explicit_ip().is_some(); NextExternalIp::new(data).get_result_async(conn).await.map_err(|e| { - use diesel::result::Error::NotFound; use diesel::result::Error::DatabaseError; + use diesel::result::Error::NotFound; match e { NotFound => { if explicit_ip {