From 17c7e463888f3076854ebec04f234a34a875b209 Mon Sep 17 00:00:00 2001 From: TekH Date: Wed, 22 Oct 2025 14:25:50 +0200 Subject: [PATCH] fix(AnnotationController): use PublishSafely for docSignedNotification Replaced `await _mediator.Publish(docSignedNotification, cancel)` with `await _mediator.PublishSafely(docSignedNotification, cancel)` to ensure safe publishing of notifications without unhandled exceptions. --- EnvelopeGenerator.Web/Controllers/AnnotationController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EnvelopeGenerator.Web/Controllers/AnnotationController.cs b/EnvelopeGenerator.Web/Controllers/AnnotationController.cs index 5b31defb..d2281cfe 100644 --- a/EnvelopeGenerator.Web/Controllers/AnnotationController.cs +++ b/EnvelopeGenerator.Web/Controllers/AnnotationController.cs @@ -65,7 +65,7 @@ public class AnnotationController : ControllerBase .ToDocSignedNotification(psPdfKitAnnotation) ?? throw new NotFoundException("Envelope receiver is not found."); - await _mediator.Publish(docSignedNotification, cancel); + await _mediator.PublishSafely(docSignedNotification, cancel); await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);