Add a static Error method in Result<T> and Result classes that accepts an Error object
- Dominant language
- C#
- Stars
- 1k
- Forks
- 127
- PR merge metrics
- No merged PRs in 30d
Description
It would be helpful to have an `Error` class similar to the existing `ValidationError` class, which can be used to encapsulate error details. Something like this:
```
public class Error
{
public string Message { get; set; }
public string Code { get; set; }
}
```
Additionally, it would be great to add a static Error method in both the `Result` and `Result` classes that accepts an Error object.
Contributor guide
Research direction
Start by examining the existing ValidationError class and the Result and Result classes to understand their current error representation and static factory methods. Define the requested Error object and add the corresponding static methods in both result classes; done means each class accepts an Error object while preserving existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100