From 049da05c3ff1fa6e41b46678cf592bc9c13872c8 Mon Sep 17 00:00:00 2001 From: Ivan Vukman Date: Fri, 13 Oct 2023 21:45:11 +0200 Subject: [PATCH] Rethrow exception from TracingJobDecorator --- src/AnagramSolver/BackgroundJobs/TracingJobDecorator.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/AnagramSolver/BackgroundJobs/TracingJobDecorator.cs b/src/AnagramSolver/BackgroundJobs/TracingJobDecorator.cs index dfc9b43..d507da4 100644 --- a/src/AnagramSolver/BackgroundJobs/TracingJobDecorator.cs +++ b/src/AnagramSolver/BackgroundJobs/TracingJobDecorator.cs @@ -1,3 +1,4 @@ +using System.Runtime.ExceptionServices; using Sentry; namespace AnagramSolver.BackgroundJobs; @@ -53,6 +54,7 @@ public async Task ExecuteAsync(T jobData) else { transaction.Finish(exception); + ExceptionDispatchInfo.Capture(exception).Throw(); } } }