Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion/Question] Did you consider PartialSuccess result? #180

Open
MoeFarag opened this issue Apr 3, 2023 · 1 comment
Open

[Suggestion/Question] Did you consider PartialSuccess result? #180

MoeFarag opened this issue Apr 3, 2023 · 1 comment

Comments

@MoeFarag
Copy link

MoeFarag commented Apr 3, 2023

I know that any result with at least one Error in the Reasons would be marked as a failure, but sometimes operations succeed with some warnings.

So did you consider having a partial success status ? could be configured to act as success or fail for backward compatibility

ps: can contribute to add feature

@altmann
Copy link
Owner

altmann commented Apr 7, 2023

You can create a class Warning which inherit from Error if you want that a Warning is handled as error (=> failed result). You can also create a class Warning which inherit from Success if you want that a Warning is handled as success (=> success result). For more details about this topic see readme https://github.com/altmann/FluentResults#designing-errors-and-success-messages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants