New:Socket for Asana Is Now Available.Learn more
Sign In

gh-error

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gh-error

Make them errors into github issues please

latest
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

gh-error

Make github issues about your nodejs errors!

Installation

npm install gh-error
# or
pnpm add gh-error
# or
yarn add gh-error

Usage

Pretty shrimple, one could say.

import { ErrorHandler } from "gh-error";

const handler = new ErrorHandler({
  ghPat: process.env.GH_PAT, // GitHub personal access token (required)
  // Optional: auto-detected from git if not provided
  repoOwner: "your-username",
  repoName: "your-repo",
});

// Bind to process errors (uncaughtException, unhandledRejection)
handler.bindToErrors();

// Or handle errors manually
try {
  throw new Error("Something went wrong!");
} catch (e) {
  await handler.handleError(e);
}

Environment Variables

Set your GitHub PAT in your environment:

GH_PAT=ghp_your_token_here

What It Does

When an error occurs, gh-error will:

  • Create a GitHub issue with the error details and a Mermaid diagram
  • If the same error occurs again, it comments on the existing issue
  • If a closed issue matches the error, it reopens it

Issues are tagged with automated-error and bug labels.

FAQs

Package last updated on 29 Nov 2025

Related posts