Skip to content

Commit

Permalink
Remove redundant null or empty check in AddSentry method.
Browse files Browse the repository at this point in the history
- Simplified the AddSentry method by removing unnecessary null or empty check for DSN parameter.
  • Loading branch information
0xF6 committed Dec 3, 2024
1 parent a88ff3a commit 6be8ae4
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/ServiceDefaults/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6be8ae4

Please sign in to comment.