Skip to content

SentryErrors

Defined in: plugins/holocron-plugin-sentry/src/capabilities/errors.ts:25

The errors capability for Sentry: finds or creates a project and reports its DSN, and manages the Comlink relay.

  • Errors

new SentryErrors(client, opts, relayClient?): SentryErrors

Defined in: plugins/holocron-plugin-sentry/src/capabilities/errors.ts:31

() => object

SentryErrorsOptions

() => object

The client for the relay, made with the Comlink token (see resolveRelayToken).

SentryErrors

readonly key: "errors"

Defined in: plugins/holocron-plugin-sentry/src/capabilities/errors.ts:27

The capability key, always errors.

Errors.key


readonly providerName: "sentry" = "sentry"

Defined in: plugins/holocron-plugin-sentry/src/capabilities/errors.ts:29

The provider name, sentry.

Errors.providerName

describe(): Promise<{ envKeys: string[]; frameworkEnvKeys: { next: string[]; }; provider: string; }>

Defined in: plugins/holocron-plugin-sentry/src/capabilities/errors.ts:50

Returns the env var names the app reads at runtime for this provider. envKeys are always pushed; the optional frameworkEnvKeys maps a framework name, as deriveStack() spells it (next), to the extra keys pushed only when that framework is in the repo’s detected stack (the root package.json and every workspace package’s).

Promise<{ envKeys: string[]; frameworkEnvKeys: { next: string[]; }; provider: string; }>

Errors.describe


ensureProject(input): Promise<{ alreadyExists: boolean; dsn: string; }>

Defined in: plugins/holocron-plugin-sentry/src/capabilities/errors.ts:69

Returns the public DSN of the project named input.name (matched by its slug), creating it when missing; needs org, and the new project uses team (default the org slug) and platform (default node).

string

string

Promise<{ alreadyExists: boolean; dsn: string; }>

Errors.ensureProject


ensureRelay(input): Promise<EnsureRelayResult>

Defined in: plugins/holocron-plugin-sentry/src/capabilities/errors.ts:38

Make the tracker send its alerts to a relay (the Comlink Worker): an integration that posts to webhookUrl, and an alert rule on each project that uses it. Idempotent: an integration or rule with the same name is adopted and only what differs is changed. clientSecret is the integration’s signing secret, handed to the caller to give the relay; it is a credential and must not be printed or stored anywhere but there. It is absent when the provider did not give it (some show it only when the integration is made).

EnsureRelayInput

Promise<EnsureRelayResult>

Errors.ensureRelay


inspect(input): Promise<ErrorsInspection>

Defined in: plugins/holocron-plugin-sentry/src/capabilities/errors.ts:46

Read the tracker’s organization and the named projects without changing anything: whether each exists, whether it has a client key (a DSN to give an SDK) and how many enabled alert rules watch it. Never returns a DSN or a key. holocron doctor errors uses it. Optional — a provider with no management API omits it.

InspectErrorsInput

Promise<ErrorsInspection>

Errors.inspect


inspectRelay(input): Promise<RelayState>

Defined in: plugins/holocron-plugin-sentry/src/capabilities/errors.ts:42

Read back what ensureRelay makes without changing anything: the integration and, for each project, whether the alert rule is on it, enabled and sends through the integration. Never reads the signing secret. Optional — a provider with no relay omits it.

InspectRelayInput

Promise<RelayState>

Errors.inspectRelay


whoami(): Promise<{ org: string; } | null>

Defined in: plugins/holocron-plugin-sentry/src/capabilities/errors.ts:59

Reachability probe. null means the check genuinely can’t run right now on an otherwise-valid configuration (e.g. Sentry’s optional org setting is unset — error ingestion still works from the DSN alone, org is only needed for the management-API calls whoami makes) — callers should fall back to describe(), not treat it as a failure. Still throws for a genuine failure (bad token, network error, etc.).

Promise<{ org: string; } | null>

Errors.whoami