From 283e41d2b1d360026653e282fb6c4dc464c369f0 Mon Sep 17 00:00:00 2001 From: John Lambert Date: Wed, 11 Sep 2024 14:25:24 -0400 Subject: [PATCH] More clarity for Bugsnag call --- .../src/Serval.Shared/Controllers/BugsnagExceptionFilter.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Serval/src/Serval.Shared/Controllers/BugsnagExceptionFilter.cs b/src/Serval/src/Serval.Shared/Controllers/BugsnagExceptionFilter.cs index 3f744428..f4e44541 100644 --- a/src/Serval/src/Serval.Shared/Controllers/BugsnagExceptionFilter.cs +++ b/src/Serval/src/Serval.Shared/Controllers/BugsnagExceptionFilter.cs @@ -6,6 +6,7 @@ public class BugsnagExceptionFilter : ExceptionFilterAttribute { public override void OnException(ExceptionContext context) { - context.HttpContext.RequestServices.GetService()?.Notify(context.Exception); + Bugsnag.IClient? client = context.HttpContext.RequestServices.GetService(); + client?.Notify(context.Exception); } }