← All modules
observability

Errors

Live

Fingerprint, deduplicate, and triage exceptions with stack traces and release context.

event.type === "error" modules/errors
Overview

What Errors does

Errors fingerprints exceptions into groups so one noisy stack trace does not bury the incident queue. Each occurrence keeps release, environment, request, and stack metadata for triage.

The module is compatible with ordinary SDK capture flows: capture locally, fail closed on network issues, and query groups in the portal by status, project, fingerprint, and release.

Wire payload

Same shape, three syntaxes

The wire protocol is plain HTTP, plain JSON, HMAC-SHA256. The TypeScript tab uses the SDK; the cURL tab is the raw HTTP equivalent; the Python tab shows the preview SDK shape.

import { createCuittyClient } from "@cuitty/sdk";
import { errorsPlugin } from "@cuitty/sdk/plugins/errors";

const cuitty = createCuittyClient({
  portalUrl: "https://app.cuitty.com",
  projectId: process.env.CUITTY_PROJECT_ID!,
  apiKey: process.env.CUITTY_API_KEY!,
});
cuitty.use(errorsPlugin());
cuitty.start();

await cuitty.emit({
  type: "error",
  timestamp: new Date().toISOString(),
  data: {
    name: "TypeError",
    message: "Cannot read properties of undefined",
    stack: "TypeError: ...",
    release: "portal@0.3.0",
    environment: "production",
  },
});
Storage

Database schema

Excerpt from modules/errors/schema.sql. One libSQL file per module — back it up with cp.

CREATE TABLE cuitty_errors.error_groups (
  id BIGSERIAL PRIMARY KEY,
  project_id TEXT NOT NULL,
  fingerprint TEXT NOT NULL,
  title TEXT NOT NULL,
  status TEXT NOT NULL DEFAULT 'open',
  first_seen BIGINT NOT NULL,
  last_seen BIGINT NOT NULL,
  occurrence_count BIGINT NOT NULL DEFAULT 1
);

Related modules