Skip to content
The foundation under itTrust and privacy

Errors and usage signals

Know what broke, without tracking anyone who said no.

When a request fails you get a short reference such as APP-CAPACITY-002 and a plain message, and that reference maps to exactly one entry in a registry. Product analytics stays a silent no-op until someone accepts the analytics cookie, including when they accept it part-way through a session.

  • 0

    tracking events before consent

  • 1

    place where every error code lives

  • 2

    tools that leave the build when unset

The problem this solves

Without a shared foundation, every team rebuilds these edge cases, differently.

The consent check someone missed

Analytics that fires on page load with a banner bolted on afterwards needs a guard at every call site, and one missed guard is a real problem. Here the guard is inside the tracking call itself.

A failure report with nothing in it

Someone says it broke, with no reference, or pastes a stack trace. There is nothing stable to match against what was actually captured. A short reference solves that in one line.

Tools that break without their keys

SDKs that assume their keys exist crash local development or behave differently between environments. Here both wrappers are safe to call unconfigured and disappear from the build entirely.

How it works

The mechanism end to end, as implemented in the repository.

  1. 1

    Consent comes first

    Every tracking call checks the analytics cookie choice. On acceptance the tracker loads lazily, and a change listener covers a yes that arrives later in the session.

  2. 2

    Errors are captured with context

    Reporting filters noise and tags each event with structured context such as organization, project and job. In development, events log locally rather than being sent.

  3. 3

    People get a stable reference

    Every failure resolves through one registry to a reference such as APP-CAPACITY-001 and a safe public message. Operator meanings stay in the repository docs.

  4. 4

    Missing keys cost nothing

    Without analytics or error-reporting keys every helper becomes a no-op and the build drops the unused tools.

Interactive example

See it working

This walkthrough demonstrates the implemented backend contract without using an account, credentials, or provider calls.

Interactive example

Explore the decisions this makes

Choose a sample state
Analytics suppressed

Deterministic sample data only. No account, provider, or network connection is used by the interaction.

Highlights

Why it matters

Tracking waits for a yes

Every tracking call checks the consent choice first. The tracker loads lazily on acceptance, and a listener covers someone who accepts mid-session.

Errors carry context

Reports are tagged with organization, project, job and AI details, so a failure can be placed without digging through raw payloads.

Failures come with a reference

Every API error maps through one registry to a support reference and a safe public message. A released reference always means the same thing.

Engineering guarantees

What this does and does not promise

Safety boundary

Error reporting is configured separately from analytics consent, and this page does not pretend otherwise. What our error context may contain, and how long it is kept, is ours to decide rather than something the code settles.

Implementation evidence

The boundary above is code, not a claim. These files carry the contract:

  • src/lib/analytics.ts
  • src/lib/sentry.ts
  • src/registries/error-codes.ts
  • docs/ERROR-CODES.md
Questions

Frequently asked questions

What errors and usage signals rests on

The docs describe the same contracts this page demonstrates.