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.
This commit is contained in:
parent
a1688608ab
commit
452077e86a
@ -28,7 +28,7 @@ public class EnvelopeExecutor : SQLExecutor, IEnvelopeExecutor
|
|||||||
var envelopes = await connection.QueryAsync<Envelope>(formattedSql);
|
var envelopes = await connection.QueryAsync<Envelope>(formattedSql);
|
||||||
var envelope = envelopes.FirstOrDefault()
|
var envelope = envelopes.FirstOrDefault()
|
||||||
?? throw new InvalidOperationException($"Envelope creation failed. Parameters:" +
|
?? 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);
|
envelope.User = await _userRepository.ReadByIdAsync(envelope.UserId);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user