-
Notifications
You must be signed in to change notification settings - Fork 122
Closed
Description
Would it be acceptable to change
public record ErrorList(IEnumerable<string> ErrorMessages, string? CorrelationId);
to
public record ErrorList(IEnumerable<string> ErrorMessages, string? CorrelationId = null);
By this it would be simpler to create an error. At least for my use case the correlationId is not needed and it is marked optional.
return Result.Error(new ErrorList(["My error"])
As an additional question or wish. I like to old approach to just return one error like this
return Result.Error("My error")
could this be added back?
CHMaagaard, ardalis and jeangatto
Metadata
Metadata
Assignees
Labels
No labels