From 5b8cef6140c194907600cbbeee267dc40be11ef1 Mon Sep 17 00:00:00 2001 From: machadoum Date: Tue, 29 Oct 2024 16:50:04 +0100 Subject: [PATCH] Demote a couple of error logs to warn --- x-pack/plugins/entity_manager/server/lib/entity_client.ts | 4 +--- .../entity_analytics/entity_store/entity_store_data_client.ts | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/entity_manager/server/lib/entity_client.ts b/x-pack/plugins/entity_manager/server/lib/entity_client.ts index 67e9f52e32bf5..4e1dd263f9ca3 100644 --- a/x-pack/plugins/entity_manager/server/lib/entity_client.ts +++ b/x-pack/plugins/entity_manager/server/lib/entity_client.ts @@ -117,9 +117,7 @@ export class EntityClient { }); if (!definition) { - const message = `Unable to find entity definition [${id}]`; - this.options.logger.error(message); - throw new EntityDefinitionNotFound(message); + throw new EntityDefinitionNotFound(`Unable to find entity definition [${id}]`); } this.options.logger.info( diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/entity_store/entity_store_data_client.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/entity_store/entity_store_data_client.ts index 429d77482841e..ce25b9e0f4a27 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/entity_store/entity_store_data_client.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/entity_store/entity_store_data_client.ts @@ -350,7 +350,7 @@ export class EntityStoreDataClient { deleteData, }); } catch (e) { - logger.error(`Error deleting entity definition for ${entityType}: ${e.message}`); + logger.warn(`Error deleting entity definition for ${entityType}: ${e.message}`); } await deleteEntityIndexComponentTemplate({ unitedDefinition,