# juju/errors

Common juju errors and functions to annotate errors.  Based on juju/errgo

Repository: https://github.com/juju/errors
Canonical: https://ross.abutalabs.com/products/juju-errors
Language: Go
License: NOASSERTION
License Family: other
Last push: 2023-10-23T23:58:07+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4500, "days_push": 1045, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1383, forks 80 (observed 2026-08-28T04:04:34.517403+00:00)

## What it is
A Go library for annotating errors with context, file/line locations, and typed error helpers, based on juju/errgo. It preserves the original error cause while allowing layered annotations and stack inspection.

## Use cases
- annotate errors with file and line context in go
- wrap errors without losing the original cause
- create typed errors like not found or already exists
- print a full error stack for debugging
- replace errors.new and fmt.errorf with location-aware versions

## When to choose
- you need rich error context and stack traces in a Go codebase
- you want typed sentinel errors with Cause-based checking
- you're working within the Juju ecosystem

## When to avoid
- you're on Go 1.13+ and only need standard error wrapping with %w and errors.Is/As
- you want a minimal dependency-free error handling approach
- you need structured or machine-readable error payloads

## Facets
- artifact type: library
- maturity: maintenance
- function: error-handling
- domain: developer-tools, backend
- platform: go, cross-platform
- tags: error-annotation, error-wrapping, stack-traces, juju

## Member repositories
- juju/errors (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:34.517403+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-30T04:40:02.534036+00:00, confidence not recorded.
  - readme: https://github.com/juju/errors (fetched 2026-08-28T04:04:34.517403+00:00, sha 42049652d23c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
