From 5d4a0ac8442d9fba4536c00627c2b46db127065a Mon Sep 17 00:00:00 2001 From: Tamo Date: Wed, 21 Jul 2021 11:50:54 +0200 Subject: [PATCH] sentry was never sending anything --- meilisearch-http/src/main.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/meilisearch-http/src/main.rs b/meilisearch-http/src/main.rs index 5638c453f..dedb6cc26 100644 --- a/meilisearch-http/src/main.rs +++ b/meilisearch-http/src/main.rs @@ -49,12 +49,12 @@ async fn main() -> Result<(), MainError> { release: sentry::release_name!(), dsn: Some(SENTRY_DSN.parse()?), before_send: Some(Arc::new(|event| { - event - .message - .as_ref() - .map(|msg| msg.to_lowercase().contains("no space left on device")) - .unwrap_or(false) - .then(|| event) + if matches!(event.message, Some(ref msg) if msg.to_lowercase().contains("no space left on device")) + { + None + } else { + Some(event) + } })), ..Default::default() });