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); } }