0.1.1 • Published 10 months ago

error-google-webhook v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Application error reporting on google chat using google webhook API

Package: error-google-webhook whould be use as a middleware.

Dependencies:

  • axios
  • express
  • dotenv

How to use ?

Install the package

npm i --save express-interceptor

Configure dotenv

WEBHOOK_URL="WEBHOOK_URL_VALUE"
// server.js
const express = require("express");
const reporterMiddleware = require("error-google-webhook");
require("dotenv").config();

const app = express();

app.use("/", (req, res, next) => {
  res.status(502);
  const name = "Kamal";
  throw new Error("Bad Gateway Error");
});

// Use as the middleware
app.use(reporterMiddleware);

const PORT = process.env.PORT || 3000;

app.listen(PORT, () => {
  console.log(`Server running on port ${PORT}`);
});

Run the application using

npm start

Limitations:

This middleware will not report for 404 and 200 responses.

0.1.1

10 months ago

1.2.1

10 months ago

1.2.0

10 months ago

1.1.45

10 months ago

1.1.44

10 months ago

1.1.43

10 months ago

1.1.42

10 months ago

1.1.41

10 months ago

1.1.4

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago