Closed philipp985 closed 3 months ago
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?
Agreed!
Would it be acceptable to change
to
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.
As an additional question or wish. I like to old approach to just return one error like this
could this be added back?