Jakar.ErrorOr
10.2.0
dotnet add package Jakar.ErrorOr --version 10.2.0
NuGet\Install-Package Jakar.ErrorOr -Version 10.2.0
<PackageReference Include="Jakar.ErrorOr" Version="10.2.0" />
<PackageVersion Include="Jakar.ErrorOr" Version="10.2.0" />
<PackageReference Include="Jakar.ErrorOr" />
paket add Jakar.ErrorOr --version 10.2.0
#r "nuget: Jakar.ErrorOr, 10.2.0"
#:package Jakar.ErrorOr@10.2.0
#addin nuget:?package=Jakar.ErrorOr&version=10.2.0
#tool nuget:?package=Jakar.ErrorOr&version=10.2.0
Jakar.ErrorOr
RFC 7807-style errors and results: Error, Errors, Alert and ErrorOrResult<T>, plus the types they're built on: Pair, StringTags, Status.
dotnet add package Jakar.ErrorOr
Split out of Jakar.Extensions in 10.12. It depends on Jakar.Json only; Jakar.Extensions 10.12.1 and later depend on it. The types keep the Jakar.Extensions namespace, so code that used them from Jakar.Extensions only needs this package reference (and a recompile). With Jakar.Extensions, use 10.12.1 or later: 10.12.0 defines Pair, StringTags and Status itself.
What's in it
Error: an RFC 7807 problem (status, title, type, instance, description andStringTagsdetails), with factories for the common cases (Error.Validation,Error.NotFound,Error.Unauthorized,Error.Create(Exception), ...).Errors: a set ofErrors plus an optionalAlert.ErrorOrResult/ErrorOrResult<T>: a value or its errors.All,Some,Success,Unknown: result markers.Pair,StringTags,IErrorDetails: error details.Status,Statuses(exception → status, titles and type names;Statuses.RegisterStatus<TException>(status)adds your own),IErrorTitles/ErrorTitles(localizable titles).
Error, Errors and Alert keep JSON members they don't declare in AdditionalData ([JsonOverflow]); they no longer derive from Jakar.Extensions' BaseClass. Error.Unauthorized(PasswordValidator.Results) and PasswordValidator.Results.ToStringTags() are in Jakar.Extensions.
Versioning
Versions are <.NET major>.<library major>.<library minor>: a breaking change bumps the middle number (10.1.0 → 10.2.0), anything else the last one.
Repository
| Path | What it is |
|---|---|
Jakar.ErrorOr/ |
The package. |
Jakar.ErrorOr.Tests/ |
NUnit tests. |
.github/workflows/ci.yml |
Build and test on Ubuntu and Windows, for every push and pull request. |
.github/workflows/publish.yml |
On master: CI, then pack and push to nuget.org (Trusted Publishing). |
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Jakar.Json (>= 10.3.0)
- JetBrains.Annotations (>= 2026.2.0)
- Microsoft.Extensions.Primitives (>= 11.0.0)
- OneOf (>= 3.0.271)
- ZLinq (>= 1.6.1)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Jakar.ErrorOr:
| Package | Downloads |
|---|---|
|
Jakar.Extensions
Extensions to aid in development. |
|
|
Jakar.Database
Package Description |
|
|
Jakar.Http
An HttpClient-based requester (WebRequester) with retries, typed JSON bodies on Jakar.Json, and WebResponse<T> results that carry their errors. |
GitHub repositories
This package is not used by any popular GitHub repositories.
10.1.0: initial release. Split out of Jakar.Extensions 10.12; the types keep the Jakar.Extensions namespace. Depends on Jakar.Json only: Pair, StringTags, Status, Statuses, IErrorDetails, IErrorTitles/ErrorTitles and NullAsEmptyArrayConverter live here (Jakar.Extensions 10.12.1 type-forwards them; use it, not 10.12.0, alongside this package). Error, Errors and Alert keep unknown JSON members in AdditionalData and no longer derive from BaseClass.