From 452077e86a999d2f76f3de4ac77022a95cefe42e Mon Sep 17 00:00:00 2001 From: TekH Date: Thu, 26 Jun 2025 11:56:49 +0200 Subject: [PATCH] Enhance error reporting for envelope creation failure Added detailed parameter information to the error message in `InvalidOperationException` for better debugging context when envelope creation fails. --- EnvelopeGenerator.Infrastructure/Executor/EnvelopeExecutor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EnvelopeGenerator.Infrastructure/Executor/EnvelopeExecutor.cs b/EnvelopeGenerator.Infrastructure/Executor/EnvelopeExecutor.cs index 945f1ac7..c5147778 100644 --- a/EnvelopeGenerator.Infrastructure/Executor/EnvelopeExecutor.cs +++ b/EnvelopeGenerator.Infrastructure/Executor/EnvelopeExecutor.cs @@ -28,7 +28,7 @@ public class EnvelopeExecutor : SQLExecutor, IEnvelopeExecutor var envelopes = await connection.QueryAsync(formattedSql); var envelope = envelopes.FirstOrDefault() ?? throw new InvalidOperationException($"Envelope creation failed. Parameters:" + - $"userId={userId}, title='{title}', message='{message}', tfaEnabled={tfaEnabled}."); ; + $"userId={userId}, title='{title}', message='{message}', tfaEnabled={tfaEnabled}."); envelope.User = await _userRepository.ReadByIdAsync(envelope.UserId);