File tree Expand file tree Collapse file tree
backend/src/Taskdeck.Domain/Entities Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,6 +53,12 @@ public class IntentEnvelopeV1 : Entity
5353 /// </summary>
5454 public string ? CorrelationId { get ; private set ; }
5555
56+ /// <summary>
57+ /// Reason for failure when status is <see cref="EnvelopeStatus.Failed"/>.
58+ /// Null when the envelope has not failed.
59+ /// </summary>
60+ public string ? FailureReason { get ; private set ; }
61+
5662 private readonly List < SourceBlock > _sourceBlocks = new ( ) ;
5763 public IReadOnlyList < SourceBlock > SourceBlocks => _sourceBlocks . AsReadOnly ( ) ;
5864
@@ -160,6 +166,7 @@ public void MarkFailed(string? reason = null)
160166 "Cannot mark an already-processed envelope as failed" ) ;
161167
162168 Status = EnvelopeStatus . Failed ;
169+ FailureReason = string . IsNullOrWhiteSpace ( reason ) ? null : reason . Trim ( ) ;
163170 Touch ( ) ;
164171 }
165172}
You can’t perform that action at this time.
0 commit comments