What problem does it solve?
It solves the problem of unstructured, low-context Go errors that lack reliable diagnostics like codes, stack traces, domain context, and user-safe messages.
Core Features & Use Cases
- Structured error context: attach domain/feature, tags, correlation IDs, request/response data, and arbitrary attributes via a fluent builder.
- Machine-readable error codes + public messages: differentiate technical details from user-facing messaging while keeping errors groupable in APM systems.
- Better debugging and resilience: wrap underlying errors cleanly and convert panics into structured errors with panic recovery.
- Use case: when a repository fails to query the database, wrap the error with query and user context, then propagate it through service and HTTP handler layers so on-call engineers can diagnose issues without re-asking for missing details.
Quick Start
Use the golang-samber-oops skill to help you refactor your Go code so every error is built with oops.In(), enriched with .With() attributes, and produced with .Wrapf() or .Errorf() using low-cardinality message strings.