npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@orello/error

v0.0.4

Published

Production error reporting and incident capture for Orello

Readme

@orello/error

TypeScript SDK for reporting production errors to the Orello monitor service.

Works with any Node.js application (Express, Fastify, NestJS, Koa, workers, or plain scripts). Use @orello/error/browser in front-end apps.

Install

npm install @orello/error

Quick start

import { Orello } from "@orello/error";

const orello = new Orello({
  apiKey: process.env.ORELLO_API_KEY!,
  service: "payment-service",
  environment: "production",
  // origin optional — defaults to current hostname (browser) or deployment env (Node)
  origin: "app.example.com",
  // monitorApiBaseUrl defaults to https://api.monitor.orello.space/api/v1
});

await orello.validateApiKey();

try {
  await charge(user, amount);
} catch (error) {
  const { payload, ingestion } = await orello.error(error, {
    context: { userId: user.id, route: "/checkout" },
  });
  // AI root-cause analysis runs server-side on the monitor service during ingest
  console.log(ingestion?.incidentId);
}

Node.js-wide capture (framework agnostic)

import { Orello, installNodeErrorHandlers } from "@orello/error";

const orello = new Orello({
  apiKey: process.env.ORELLO_API_KEY!,
  service: "api",
  environment: process.env.NODE_ENV ?? "development",
});

const detach = installNodeErrorHandlers(orello, {
  context: { app: "api-server" },
});

// later, if needed
// detach();

Server-side analysis

Clients send the error payload and Orello API key only. The monitor service runs AI analysis on ingest when credentials are configured:

  1. Per-org keys from Dashboard → Voice & AI
  2. Orello fallbackGOOGLE_GENERATIVE_AI_API_KEY on monitor infrastructure

Routine client errors (401/403, unauthorized, invalid token, etc.) are ignored and not stored.

Optional endpoint: POST /api/v1/errors/analyze (same auth as ingest).

Browser apps:

import { Orello } from "@orello/error/browser";

wrap

await orello.wrap(async () => {
  await paymentService.charge(user, amount);
}, { context: { userId: user.id } });

Email notifications

Not part of the SDK. The monitor service sends alerts after ingest when configured:

| Variable | Purpose | | -------- | ------- | | ORELLO_ERROR_ALERT_TO | Comma-separated recipients | | ORELLO_ERROR_SMTP_* | Optional org SMTP (HOST, PORT, USER, PASS, FROM) | | ORELLO_ERROR_RESEND_API_KEY | Optional org Resend key | | ORELLO_RESEND_API_KEY | Orello fallback Resend |

Auto-attached local context (Node)

On every orello.error() call (Node.js), the SDK automatically loads .orello/context and sends it under context.orelloLocal:

  • notes.md — long-term notes
  • Recent snapshots from .orello/context/snapshots/ (newest first, capped)
  • Optional project file tree when includeProjectStructureOnError: true
const orello = new Orello({
  apiKey: process.env.ORELLO_API_KEY!,
  service: "api",
  environment: "production",
  attachLocalContext: true, // default
});

await orello.initContext();
await orello.addContextNote("Payment provider uses Stripe webhooks v2");

await orello.error(err, {
  context: { route: "/checkout" },
  attachLocalContext: false, // per-report opt-out
});

Use saveContext(), addContextNote(), and investigation tools to populate .orello/context before errors occur.

Browser (@orello/error/browser) has no filesystem — pass context manually.

Environment variables

| Variable | Purpose | | -------- | ------- | | ORELLO_ERROR_API_KEY | Monitor API key (orl_...) | | ORELLO_ERROR_ORIGIN | Hostname for API key domain validation |