smart-error-sdk
v0.1.2
Published
Smart Error Notifier SDK for Node.js - capture and report errors to your SEN API
Maintainers
Readme
@smart-error/sdk (MVP)
Minimal Node.js SDK to report errors to Smart Error Notifier API.
Install
npm i @smart-error/sdkUsage
import { initSmartError } from "@smart-error/sdk";
const client = initSmartError({
apiUrl: "http://localhost:4000",
apiKey: process.env.SMART_ERROR_API_KEY!,
});
// Capture manually
client.captureException(new Error("Something broke"));
// Handlers for uncaughtException / unhandledRejection are installed automatically