cockroachdb

cockroachdb/errors

Go Apache-2.0 Dev Tools

Go error library with error portability over the network

2.4k stars
74 forks
active
GitHub +2 / week

2.4k

Stars

74

Forks

24

Open issues

22

Contributors

v1.14.0 18 Jun 2026

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...

Dev Tools Library Discovery value: 6/10
Documentation 8/10
Activity 9/10
Community 8/10
Code quality 7/10

Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.

Overall score 8/10

AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.

error-handling distributed-systems network-serialization go-library observability
Actively maintained Well documented Niche/specialized use case Production ready
Deep Analysis · Based on README and public signals
2w ago

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.

Origin

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.

Growth

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.

In production

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.

Code analysis
Architecture

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.

Tests

not documented in README

Maintenance

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.

Honest verdict

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

Risks
  • 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.
Prediction

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.

0 found this helpful

Newsletter

Get analyses like this every Monday

Free weekly digest of the most interesting open-source discoveries.

Languages

Go
100%

Information

Language
Go
License
Apache-2.0
Last updated
7d ago
Created
86mo ago
Analyzed with
anthropic/claude-haiku-4-5

Stars over time

Loading…

Contributors over time

Top 100 contributors only — repos with more will plateau at 100.

Loading…

Similar repos

cockroachdb

cockroachdb/cockroach

CockroachDB is a distributed SQL database built for cloud-native environments,...

32.3k Go Data
golang

golang/net

golang/net is the official Go supplementary networking library providing...

pkg

pkg/errors

pkg/errors provides Go error-handling primitives that add context to errors...

8.3k Go Dev Tools
redis

redis/go-redis

go-redis is the official Redis client library for Go, providing a...

22.2k Go Dev Tools
connectrpc

connectrpc/connect-go

Connect is a Go library for building browser and gRPC-compatible HTTP APIs...

vs. alternatives
pkg/errors

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.

Go stdlib errors (1.13+)

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.

golang/net (Go standard library networking)

Different layer—golang/net handles protocol transport; cockroachdb/errors handles error semantics over the network. Complementary rather than competitive.

connectrpc/connect-go

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.