FluentResults icon indicating copy to clipboard operation
FluentResults copied to clipboard

Errors.Add has no effect

Open michaelmcneilnet opened this issue 1 year ago • 1 comments

FluentResult v3.16.0

var result = new Result();
result.Errors.Add(new Error("A"));
var errorCount = result.Errors.Count();

errorCount is 0 but I'd expect 1 result.IsFailed is false, but I'd expect true

var result = new Result();
result.Reasons.Add(new Error("A"));
var errorCount = result.Errors.Count();

errorCount is 1 result.IsFailed is true

michaelmcneilnet avatar Sep 23 '24 21:09 michaelmcneilnet

I think I've fallen into the trap raised by https://github.com/altmann/FluentResults/issues/197 which is fixed in the open PR https://github.com/altmann/FluentResults/pull/164

michaelmcneilnet avatar Sep 24 '24 10:09 michaelmcneilnet

Implemented in the next new version

altmann avatar Jun 28 '25 19:06 altmann