From 6be8ae4f24ce0e666cb5d694574a0400f65556c2 Mon Sep 17 00:00:00 2001 From: Yuuki Wesp Date: Wed, 4 Dec 2024 02:49:37 +0300 Subject: [PATCH] Remove redundant null or empty check in AddSentry method. - Simplified the AddSentry method by removing unnecessary null or empty check for DSN parameter. --- src/ServiceDefaults/Extensions.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/ServiceDefaults/Extensions.cs b/src/ServiceDefaults/Extensions.cs index 6a62d10..66472b9 100644 --- a/src/ServiceDefaults/Extensions.cs +++ b/src/ServiceDefaults/Extensions.cs @@ -46,8 +46,6 @@ public static IHostApplicationBuilder AddServiceDefaults(this IHostApplicationBu public static IHostApplicationBuilder AddSentry(this WebApplicationBuilder builder, string? dsn) { - if (string.IsNullOrWhiteSpace(dsn)) return builder; - builder.WebHost.UseSentry(o => { o.Dsn = dsn;