diff --git a/iot_config/src/gateway_service.rs b/iot_config/src/gateway_service.rs index c0198ab89..a791021ca 100644 --- a/iot_config/src/gateway_service.rs +++ b/iot_config/src/gateway_service.rs @@ -206,7 +206,7 @@ impl iot_config::Gateway for GatewayService { let metadata_info = gateway_info::db::get_info(&self.metadata_pool, address) .await .map_err(|_| Status::internal("error fetching gateway info"))? - .ok_or(Status::not_found(format!( + .ok_or_else(|| Status::not_found(format!( "gateway not found: pubkey = {address:}" )))?;