Skip to content

Releases: jamesgober/dotnet-error-kit

v1.0.0 - Initial Release

23 Feb 22:41

Choose a tag to compare

dotnet-error-kit v1.0.0 Release

February 23, 2026

Welcome to v1.0.0

This is the first stable release of dotnet-error-kit, a production-ready error handling framework for .NET. The API is now locked for 1.x, and the documentation, tests, and benchmarks are in place for long-term use.

What is dotnet-error-kit?

dotnet-error-kit provides typed errors, context chains, RFC 7807 Problem Details mapping, a Result pattern, and an exception bridge so you can move error handling out of ad-hoc exception flows. It is built for high performance, strong validation, and clean ergonomics across synchronous and asynchronous paths.

Key Features

Typed Errors and Codes

  • Strongly-typed error codes with severity metadata
  • Centralized registry with category helpers
  • Context chains for adding diagnostic detail as errors propagate

Result Pattern and Exception Bridge

  • Result and Result<T> for explicit error handling
  • ErrorException bridge for boundary crossings
  • Conversion helpers to map exceptions back to typed errors

RFC 7807 Problem Details

  • Mapping helpers for Problem Details payloads
  • JSON serialization utilities for API responses
  • Structured metadata surfaced through extensions

Hooks and Reporting

  • Synchronous and asynchronous observers
  • Error reporting service with cancellation support
  • Thread-safe, lock-free publish pipeline

Performance and Quality

  • Allocation-aware hot paths
  • Extensive unit tests and edge case coverage
  • BenchmarkDotNet suite for core operations

Installation

Install via NuGet:

dotnet add package JG.ErrorKit

Or via Package Manager Console:

Install-Package JG.ErrorKit

Quick Start

Define your errors:

public sealed class UserErrors : ErrorCategory
{
    public static readonly ErrorCode NotFound = new("USER_001", "User not found");
    public static readonly ErrorCode InvalidEmail = new("USER_002", "Invalid email format");
}

Return typed results:

public Result<User> GetUser(string id)
{
    var user = _repo.Find(id);
    if (user is null)
    {
        return AppError.From(UserErrors.NotFound)
            .WithContext("id", id)
            .WithMetadata("traceId", _traceAccessor.TraceId);
    }

    return user;
}

For deeper examples, see the getting started guide.

Documentation

Community & Support

License

Licensed under the Apache License 2.0. See LICENSE for details.


Full Changelog: https://github.com/jamesgober/dotnet-error-kit/commits/v1.0.0