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

@concordiq/error-sdk

v1.0.7

Published

Error monitoring SDK

Readme

📦 @concordiq/error-sdk

Official ConcordIQ Error Tracking SDK for Node.js and Express applications.

Easily capture, monitor, and analyze application errors with rich context and detailed stack traces.


✨ Features

  • ✅ Manual error tracking
  • ✅ Express middleware support
  • ✅ Global crash handling
  • ✅ TypeScript support
  • ✅ Lightweight and fast

📥 Installation

Install the SDK using npm:

npm install @concordiq/error-sdk


## Initialize the SDK once when your application starts.

`Example (JavaScript / TypeScript)`
import ErrorSDK from "@concordiq/error-sdk";

ErrorSDK.init({
  apiKey: "PROJECT_API_KEY",
  endpoint: "https://api.mysaas.com/ingest/events",
  env: "production",
  service: "payment-api",
});


📌 Import Methods

`Choose the import style that fits your project.`

`✅ Default Import (Recommended)`

import ErrorSDK from "@concordiq/error-sdk";

ErrorSDK.init({ ... });


`✅ Named Import (Tree-Shaking Support)`
import { init, capture } from "@concordiq/error-sdk";

init({ ... });


`✅ CommonJS`
const ErrorSDK = require("@concordiq/error-sdk");



.

## 🚀 Recommended Usage in Controllers / Services

Using the SDK inside controllers and services is the best practice, especially for business-logic errors.

Example (Express + TypeScript)


import { Request, Response, NextFunction } from "express";
import ErrorSDK from "@concordiq/error-sdk";

export const createPayment = async (
  req: Request,
  res: Response,
  next: NextFunction
) => {
  try {
    const { amount } = req.body;

    if (!amount) {
      throw new Error("Amount is required");
    }

    if (amount < 100) {
      throw new Error("Minimum payment is 100");
    }

    res.status(201).json({
      success: true,
      message: "Payment created",
    });

  } catch (error: any) {

    /**
     * Capture error manually
     */
    ErrorSDK.capture(error, {
      controller: "createPayment",
      message: error.message,
      body: req.body,
      stack: error.stack,
      user: req.user?.name,
    });

    /**
     * Forward to global error handler
     */
    next(error);
  }
};


# for Application entry points (e.g. Express routes), use the SDK middleware.

import ErrorSDK from "@concordiq/error-sdk";
import { Request, Response, NextFunction } from "express";

/**
 * Initialize ErrorSDK once on application startup
 */
ErrorSDK.init({
  apiKey: process.env.CONCORDIQ_API_KEY || "YOUR_API_KEY",
  endpoint: "https://concordiq.onrender.com/api/v1/ingest/events",
  env: process.env.NODE_ENV || "production",
  service: "payment-api",
});

/**
 * Custom Express error handler (Optional)
 * Captures errors before forwarding to the global handler
 */
export function expressHandler() {
  return (
    err: Error,
    req: Request,
    res: Response,
    next: NextFunction
  ) => {
    ErrorSDK.capture(err, {
      url: req.originalUrl,
      method: req.method,
      user: (req as any).user?.id,
    });

    next(err);
  };
}

/**
 * Register SDK middleware (MUST be last)
 * Ensures all unhandled errors are captured
 */
app.use(ErrorSDK.expressMiddleware());

/**
 * Confirm SDK initialization (Optional debug log)
 */
console.log("ErrorSDK successfully initialized");




💡 Why Use @concordiq/error-sdk?

This SDK provides rich, structured error reports including:

✔ Controller name

✔ User information

✔ Request payload

✔ Business context

✔ Stack trace

✔ Global error handling support


## Your dashboard becomes:

📊 Clear, actionable, and highly informative.


# 📊 Dashboard Data

# Each error report includes:

Application environment

Service name

Error message

Stack trace

Custom metadata

User/session details

This helps you debug issues faster and more accurately.