ardalis / Result

A result abstraction that can be mapped to HTTP response codes if needed.
MIT License
866 stars 107 forks source link

Partial Failure #105

Open colespencer1453 opened 1 year ago

colespencer1453 commented 1 year ago

Hello!

I really love the idea of using this package as well as Ardalis.GuardClause.

One of my projects requires saving to a data store that is outside of my control and doesn't work as a transaction.

Because of that it is possible for partial data failure.

I'd like to return to the user the error result, while also capturing what succeeded like a 207 response.

Is there an easy way to do that with this package or by extending it?

ardalis commented 1 year ago

I could see needing this. Without doing a bit of research I'm not sure if you can easily extend the package to support it yourself, but if not I'd certainly be open to a PR that adds the support to the package itself.