# pkg/errors

Simple error handling primitives

Repository: https://github.com/pkg/errors
Canonical: https://ross.abutalabs.com/products/errors
Homepage: https://godoc.org/github.com/pkg/errors
Language: Go
License: BSD-2-Clause
License Family: permissive
Last push: 2026-03-27T15:11:52+00:00

## Health v2 (maintenance only)
Score: 56/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 74, release rhythm 8, longevity 100
- inputs: {"age_days": 3902, "days_push": 159, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 8259, forks 715 (observed 2026-08-28T04:10:19.940172+00:00)

## What it is
A Go library providing simple error handling primitives, most notably errors.Wrap for adding context and stack traces to errors without destroying the original value. It is now in maintenance mode since Go 1.13's standard errors package covers wrapping with %w.

## Use cases
- add context to errors in go
- wrap errors with stack traces in go
- get the original cause of a wrapped error
- improve error messages in go applications
- debug where an error originated in go code

## When to choose
- you are on Go < 1.13 and need error wrapping
- you want stack traces captured at error creation
- you maintain an existing codebase already using this package

## When to avoid
- you are on Go 1.13+ and can use the standard errors package with %w wrapping
- you need actively developed features or new functionality
- you need errors.Is/errors.As compatibility features built-in

## Facets
- artifact type: library
- maturity: maintenance
- function: error-handling, developer-tools
- domain: developer-tools, backend, programming-languages
- platform: go, cross-platform
- tags: go, error-wrapping, stack-traces, error-context, standard-library-alternative

## Member repositories
- pkg/errors (main) score 56

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:19.940172+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:28:11.421218+00:00, confidence not recorded.
  - readme: https://github.com/pkg/errors (fetched 2026-08-28T04:10:19.940172+00:00, sha 05f05fab4a67)
  - homepage: https://godoc.org/github.com/pkg/errors (fetched 2026-08-29T08:27:53.704905+00:00, sha 3d1a90a8fa8f)
  - site_page: https://pkg.go.dev/about (fetched 2026-08-29T08:27:53.716641+00:00, sha 757852027879)
  - site_page: https://pkg.go.dev/github.com/pkg/errors (fetched 2026-08-29T08:27:53.714459+00:00, sha 1bf99fbd5b56)
  - site_page: https://go.dev/project (fetched 2026-08-29T08:27:53.718574+00:00, sha d5ca00bb378b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
