-
Notifications
You must be signed in to change notification settings - Fork 0
Home English
Vinícius Campos edited this page Aug 22, 2026
·
2 revisions

catch it before the whistle · Português
Domain errors as Result, not exceptions. The domain returns an Error; ASP.NET Core maps it to Problem Details (RFC 7807). Messages live in JSON catalogs, not in C#.
| Page | What it covers |
|---|---|
| Getting started | Install, register, and return your first Problem Details response |
| Concepts |
Error, ErrorCode, ErrorKind, Result, primary error, catalogs, the escape hatch |
| Domain guide | Writing domain code with Result<T>: factories, Custom, Bind/Map/Combine
|
| ASP.NET Core guide |
ToHttpResult / ToActionResult, status selection, the response shape, 500 handling |
| FluentValidation | Map FluentValidation failures to Offside Error / Result
|
| FastEndpoints |
UseOffside, SendOffsideAsync, OpenAPI expected errors |
| MediatR integration | Publish result errors as notifications, collect them per scope, and handle retries safely |
| Messages and cultures | Catalog format, culture fallback, {token} interpolation |
| CLI |
offside init — agent skills and catalog templates |
| API reference | Every public type and member, in one page |
| FAQ | Design decisions and common pitfalls |
| Page | What it covers |
|---|---|
| Architecture | Seven projects, package boundaries and dependency graph |
| Error and result lifecycle | Domain failure creation, composition and HTTP mapping |
| Message resolution | Catalog lookup, culture fallback, interpolation and Azure limits |
| Integrations and adapters | Problem Details, FluentValidation, FastEndpoints and MediatR |
| Build, testing and release | Solution validation, CI, release and CLI installation |
// Domain — knows nothing about HTTP
public Result<Order> Get(string id)
{
var order = _orders.Find(id);
return order is null
? Result<Order>.Failure(Error.NotFound("order", id))
: Result<Order>.Success(order);
}// Endpoint — one line
app.MapGet("/orders/{id}", (string id, HttpContext http) => _orders.Get(id).ToHttpResult(http));// Response — 404, application/problem+json
{
"type": "https://httpstatuses.io/404",
"title": "NotFound",
"status": 404,
"detail": "order '42' was not found.",
"errorCode": "NOT_FOUND",
"traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
"errors": [
{ "code": "not_found", "errorCode": "NOT_FOUND", "kind": "NotFound", "detail": "order '42' was not found.", "field": null }
]
}The core package has no ASP.NET or MediatR dependency, so domain projects can reference it freely.
- Changelog · Contributing · Support · Security
Código e docs/ são canônicos · Code and docs/ are canonical · Base dbca345372483477097385eb43d850484b00ec13 · 2026-08-22 · Repositório / Repository