You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public static void Test()
{
Result<Customer> result = Result.Ok(new Customer() { Name = "Name", Email = "some@email.com"});
var valueBefore = result.Value; // This works. The Value is not null
result.WithError(new Error("Some Error"));
var valueAfter = result.Value; // This will throw a exception: System.InvalidOperationException: 'Result is in status failed. Value is not set. Having: Error with Message='Some Error''
}
The text was updated successfully, but these errors were encountered:
Here are the steps to reproduce the behaviour.
The text was updated successfully, but these errors were encountered: