v2.5.0
What's New
New Or* Extensions
OrUnexpected(description)- Returns Unexpected error (500) if nullOrError(Error error)- Returns custom error if nullOrError(Func<Error> factory)- Lazy custom error creation
Struct Overloads
Added missing struct overloads for nullable value types:
OrUnauthorized<T>where T : structOrForbidden<T>where T : structOrConflict<T>where T : structOrFailure<T>where T : struct
Documentation
- Updated README with comprehensive API documentation
- Improved NuGet package descriptions and tags
Usage
// New extensions
value.OrUnexpected("Something went wrong");
value.OrError(Error.Custom(422, "Custom.Code", "Custom message"));
value.OrError(() => BuildExpensiveError());
// Struct support
int? maybeId = GetId();
return maybeId.OrNotFound("ID not found");Full Changelog: v2.4.0...v2.5.0