# pkg/errors

> Simple error handling primitives for Go: wrap errors with context and stack traces

Source: https://talira.ai/catalog/pkg-errors-ta75ykks
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [languages / go](https://talira.ai/categories/languages/go)
- Platforms: linux, macos, windows[^1]
- Licence: BSD-2-Clause[^2]
- Pricing: Free and open source[^2]
- Pricing notes: Free and open source.
- Free tier: yes[^2]
- Self-hostable: yes[^1]
- Backed by: [Dave Cheney](https://talira.ai/orgs/dave-cheney.md)

pkg/errors is a small Go library for adding context to errors as they travel up the call stack. errors.Wrap and errors.Wrapf add a message and a stack trace to an error, errors.Cause unwraps it to the original, and formatting with %+v prints the stack. Since the Go 2 error proposals it has been in maintenance mode: it takes bug fixes but no new features, and its last code change was in 2020.

## Links

- GitHub: https://github.com/pkg/errors
- Docs: https://pkg.go.dev/github.com/pkg/errors

## Problems it solves

- add context to errors in Go without losing the original error
- get a stack trace for where an error happened in my Go code
- find the root cause of a wrapped error in Go

## Features

- Wrap and Wrapf add context and a stack trace
- Cause returns the original error
- %+v prints the stack trace

## Limitations

- In maintenance mode: it accepts bug fixes but no new features.[^1]

## Capabilities

- Has official SDKs: plan not known

## Trust

Overall: 0.27 out of 1.
Signals: backing 0.30, extensibility 0.00.

- backed by Dave Cheney

Warnings:

- GitHub activity not fetched yet

## Sources

[^1]: https://github.com/pkg/errors/blob/master/README.md (checked 23 Nov 2026)
[^2]: https://github.com/pkg/errors/blob/master/LICENSE (checked 23 Nov 2026)
