@argusdev/sdk-node
v0.2.0
Published
Argus SDK for Node.js — uncaught exceptions, unhandled rejections, Express middleware.
Maintainers
Readme
@argusdev/sdk-node
Node.js SDK for Argus — captures uncaught exceptions and unhandled rejections, with an optional Express error handler.
Install
npm install @argusdev/sdk-nodeUsage
import { init } from "@argusdev/sdk-node";
init({ dsn: "https://<publicKey>@<host>/<projectId>", environment: "production" });process.on("uncaughtException") and process.on("unhandledRejection") are wired automatically. On an uncaught exception the event is sent, then the process exits 1 (crash behavior preserved).
Express
Add the error handler after your routes, before your own:
import { argusErrorHandler } from "@argusdev/sdk-node";
app.use(argusErrorHandler());It captures the error with request context, then passes it along — it observes, never absorbs.
MIT © Treasure Odetokun
