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

@argusdev/sdk-angular

v0.3.0

Published

Argus SDK for Angular — ErrorHandler provider on top of @argusdev/sdk-browser.

Readme

@argusdev/sdk-angular

Angular SDK for Argus — an ErrorHandler provider on top of @argusdev/sdk-browser. Catches everything zone.js swallows, and unwraps Angular's error wrappers so you get the real bug instead of [object Object].

Install

npm install @argusdev/sdk-angular

Usage

// main.ts
import { ErrorHandler } from "@angular/core";
import { bootstrapApplication } from "@angular/platform-browser";
import { init, ArgusErrorHandler } from "@argusdev/sdk-angular";
import { AppComponent } from "./app/app.component";

init({ dsn: "https://<publicKey>@<host>/<projectId>" });

bootstrapApplication(AppComponent, {
  providers: [{ provide: ErrorHandler, useClass: ArgusErrorHandler }],
});

NgModule apps use the same provider:

@NgModule({
  providers: [{ provide: ErrorHandler, useClass: ArgusErrorHandler }],
})
export class AppModule {}

init() covers the global handlers (window.onerror, unhandled rejections, web vitals); the provider covers everything inside Angular's zone. You want both — errors from third-party scripts only hit the former, component errors only the latter.

Manual capture:

import { captureException } from "@argusdev/sdk-angular";

this.http.get("/api/me").subscribe({
  error: (err) => captureException(err),
});

Options

Same as @argusdev/sdk-browser:

| Option | Default | What | | ------------- | ---------- | --------------------------------------------- | | dsn | required | https://KEY@host/PROJECT_ID | | environment | — | e.g. "production" | | release | — | version string, for regression tracking | | vitals | true | page.load transaction with LCP/CLS/FCP/TTFB |

What the unwrapping buys you

Angular rarely hands ErrorHandler a plain Error. It hands it a wrapper:

| What arrives | Where the real error hides | | -------------------------------- | -------------------------- | | unhandled promise rejection | { rejection: Error } (zone.js) | | Angular rethrow | error.ngOriginalError | | HttpErrorResponse | Error-shaped, but not instanceof Error |

Left alone, all three stringify to [object Object] and fingerprint into a single meaningless Issue. normalizeAngularError() walks the chain (up to 4 levels), pulls out the innermost real error, and keeps the metadata that mattered off the wrapper:

  • httpStatus — e.g. "500"
  • httpUrl — the failed request URL (truncated to 200 chars)

For HttpErrorResponse the wrapper's own name/message are kept, because they're already the useful sentence: Http failure response for /api/users: 500 Internal Server Error.

The helper is exported if you want it independently:

import { normalizeAngularError } from "@argusdev/sdk-angular";

const { error, tags } = normalizeAngularError(caught);

No @angular/core dependency

This package doesn't import Angular. ArgusErrorHandler is structurally assignable to Angular's ErrorHandler interface, so useClass typechecks against whatever version you have — the same approach @argusdev/sdk-node uses to ship Express middleware without depending on Express.

It also has a zero-argument constructor and no @Injectable() decorator: Angular instantiates it via useClass as-is, and the package stays clear of Angular's decorator/TypeScript-version coupling. That's why init() is a separate call in main.ts rather than an argument to the provider.

Angular's default handler logs to the console. Providing your own silences that, so ArgusErrorHandler re-logs — we observe, never absorb.

MIT © Treasure Odetokun