Go error library with error portability over the network
2.4k
Stars
74
Forks
24
Open issues
22
Contributors
AI Analysis
A Go error library designed as a drop-in replacement for pkg/errors and Go's standard errors package, with unique network portability capabilities for distributed systems. It specializes in serializing errors across service boundaries while preserving type information and supporting PII-free error details, making it particularly valuable for cloud infrastructure and microservices architectures. This library is best suited for teams building distributed systems in Go who need reliable cross-se...
Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.
AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.
Go error library with network serialization for distributed systems
cockroachdb/errors is a Go error handling library that extends pkg/errors and stdlib errors with network portability—errors can be serialized, transmitted, and deserialized across distributed systems while preserving type information and cause chains. It adds PII-redaction, Sentry integration, and detailed error context wrappers. Built by CockroachDB for their own distributed database, it appears to serve primarily teams building multi-version distributed systems that need error identity and details to survive network boundaries.
Created June 2019 as part of CockroachDB's internal error handling RFC. Designed to solve the problem of error object semantics being lost when errors cross process/network boundaries—a core challenge in distributed database development. Positioned as a superset of pkg/errors and Go 1.13+ stdlib errors.
Star growth has been steady but modest (2,422 stars as of June 2026, 11 in last 7 days). Appears driven by organic adoption within the distributed systems and database communities rather than viral adoption. Last push June 18, 2026 indicates active maintenance. The library likely serves a specific niche—teams that need error semantics preserved across RPC boundaries—rather than pursuing broad replacement of stdlib errors.
Adoption not verified from public sources beyond CockroachDB's own use. No documented case studies, integration announcements, or adoption data in README. The library exists in CockroachDB's ecosystem and likely used within CockroachDB itself, but third-party production usage is not documented. This may reflect the specialized nature of the problem (network-portable errors) rather than lack of adoption.
Based on README, the library provides: (1) drop-in API compatibility with pkg/errors and Go 1.13+ errors; (2) transparent protobuf encoding/decoding of errors with forward compatibility for unknown error types; (3) cause chain tracking compatible with both Cause() and Unwrap(); (4) wrapper types for assertions, issue references, user hints, secondary causes, and logtag context; (5) SafeFormatter for PII-redacted output; (6) optional Sentry.io integration. Likely uses reflection or codec-based serialization for error portability, but actual implementation approach not verifiable from README alone.
not documented in README
Actively maintained. Last push June 18, 2026 (11 days before analysis date). CI badge present. Go Reference documentation available. No recent signs of abandonment, though specific issue/PR velocity not visible from metadata alone. Steady, not aggressive maintenance posture—consistent with a stable library serving a defined use case rather than rapid feature development.
ADOPT IF: you are building a distributed system where error types and cause chains must survive RPC/network serialization and you need PII-free error reporting. AVOID IF: you are building single-process applications, simple microservices, or systems where errors don't need to cross process boundaries—stdlib errors or pkg/errors are lighter. MONITOR IF: you work in distributed systems and are currently losing error context during RPC failures; this library may reduce debugging friction, but adoption is still concentrated in specialized domains.
Independent dimensions
Mainstream potential
3/10
Technical importance
7/10
Adoption evidence
3/10
- Adoption appears concentrated; limited evidence of uptake outside distributed database/systems communities, which may indicate the use case is narrower than initially apparent.
- Network serialization adds complexity and potential compatibility surface; forward compatibility claims are strong on paper but real-world multi-version scenarios not documented.
- Dependency on protobuf for serialization may conflict with teams using alternative serialization formats (JSON, MessagePack, etc.).
- PII-redaction and Sentry integration add coupling to those specific concerns; teams with different compliance or observability requirements may find these features misaligned.
- Maintenance is steady but not aggressive; if CockroachDB's priorities shift, development velocity could slow, potentially affecting adoption of downstream projects.
Likely to remain a specialized, well-maintained tool for distributed database and RPC system builders rather than achieving broad Go ecosystem adoption. The problem it solves is real and important, but the audience is inherently limited. Maintenance will probably continue at steady pace.
Explore similar
Newsletter
Get analyses like this every Monday
Free weekly digest of the most interesting open-source discoveries.
Languages
Information
- Language
- Go
- License
- Apache-2.0
- Last updated
- 7d ago
- Created
- 86mo ago
- Analyzed with
- anthropic/claude-haiku-4-5
Stars over time
Contributors over time
Top 100 contributors only — repos with more will plateau at 100.
Open issues
Errors returned from Join are incompatible with errors returned the standard lib's errors.Join
Add errors.AsType helper (Go 1.26+)
Make sentry an optional dependency
move subpackages to internal
Behavior of HasType and HasInterface is counter-intuitive
Top contributors
Similar repos
cockroachdb/cockroach
CockroachDB is a distributed SQL database built for cloud-native environments,...
| Repository | Stars | Week Δ | Language | Score | Updated |
|---|---|---|---|---|---|
|
|
2.4k | +2 | Go | 8/10 | 7d ago |
|
|
32.3k | — | Go | 8/10 | 4d ago |
|
|
3k | — | Go | 9/10 | 1d ago |
|
|
8.3k | — | Go | 8/10 | 3mo ago |
|
|
22.2k | — | Go | 9/10 | 21h ago |
|
|
4k | — | Go | 8/10 | 2d ago |
Older, widely-adopted error library. cockroachdb/errors is a superset that adds network serialization, PII-redaction, and Sentry integration. pkg/errors remains simpler and lighter for single-process applications.
cockroachdb/errors is compatible with stdlib but adds rich wrapping, network portability, and context attachment that stdlib does not provide. Stdlib is universally available; cockroachdb/errors is an opt-in extension.
Different layer—golang/net handles protocol transport; cockroachdb/errors handles error semantics over the network. Complementary rather than competitive.
RPC framework that may use error handling libraries; cockroachdb/errors solves a downstream problem (preserving error semantics) that frameworks like connect-go need to solve.