ErrorApi.LanguageExt.V5 1.0.1-beta.1

This is a prerelease version of ErrorApi.LanguageExt.V5.
dotnet add package ErrorApi.LanguageExt.V5 --version 1.0.1-beta.1
                    
NuGet\Install-Package ErrorApi.LanguageExt.V5 -Version 1.0.1-beta.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ErrorApi.LanguageExt.V5" Version="1.0.1-beta.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ErrorApi.LanguageExt.V5" Version="1.0.1-beta.1" />
                    
Directory.Packages.props
<PackageReference Include="ErrorApi.LanguageExt.V5" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ErrorApi.LanguageExt.V5 --version 1.0.1-beta.1
                    
#r "nuget: ErrorApi.LanguageExt.V5, 1.0.1-beta.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ErrorApi.LanguageExt.V5@1.0.1-beta.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ErrorApi.LanguageExt.V5&version=1.0.1-beta.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=ErrorApi.LanguageExt.V5&version=1.0.1-beta.1&prerelease
                    
Install as a Cake Tool

ErrorApi

ErrorApi.LanguageExt.V5

The language-ext v5 twin of ErrorApi.LanguageExt: the same surface — Fin<T>.ToHttpResult(), ToCreated, ToCreatedAtRoute, Either<Error, T> — compiled against the 5.x API, so every endpoint's OpenAPI document lists the failures it can actually return and the wire response carries a stable machine-readable code.

dotnet add package ErrorApi.LanguageExt.V5 --prerelease

Prerelease, on purpose. language-ext 5.0.0 has no stable release yet, and NuGet rightly refuses a stable package with a prerelease dependency. This package tracks the beta and goes stable the moment 5.0.0 does. On v4? Use ErrorApi.LanguageExt — the two packages are alternatives, never references of one project.

Usage

Identical to the v4 adapter — annotate your own Expected subclasses, which is the idiomatic way to model a domain failure in language-ext:

[ErrorApi.Error("Orders.NotFound", 404, Title = "Order not found")]
public sealed record OrderNotFound(Guid Id) : Expected("Order not found", 404);

public Fin<Order> GetById(Guid id) =>
    _orders.TryGetValue(id, out var order) ? order : new OrderNotFound(id);

builder.Services.AddErrorApi();
orders.MapGet("/{id:guid}", (Guid id, IOrderService s) => s.GetById(id).ToHttpResult());
// Document: 200 + 404 with code "Orders.NotFound"; wire: the same problem body.

Resolution goes by type first, through the generated pattern switch. Failing that the numeric code is used when it already looks like an HTTP status; everything else becomes a 500.

Versions

Pinned to LanguageExt.Core 5.0.0-beta-77; the suite tracks newer betas via -p:LanguageExtV5TestVersion=5.0.0-beta-xx.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1-beta.1 66 8/31/2026
1.0.0-beta.1 56 8/30/2026