Skip to content

Optional CorrelationId on ErrorList #181

@philipp985

Description

@philipp985

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions