New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@firstfleet/fferrorhandler

Package Overview
Dependencies
Maintainers
5
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@firstfleet/fferrorhandler - npm Package Compare versions

Comparing version
2.1.6
to
2.1.7
+3
-1
middleware.js

@@ -7,2 +7,3 @@ const handlers = require("./handlers");

const appName = process.env.PAPERTRAIL_PROGRAM || "UNKNOWN";
const IPHEADER = 'x-real-ip' //header passed in from nginx

@@ -113,3 +114,4 @@ /**

/** If this is an expected error, log to papertrail, with any additional data */
handlers.logAndNotify(appName, routeString, error.message, additionalData);
const ip = req.headers[IPHEADER] ?? req.ip;
handlers.logAndNotify(appName, routeString, `${error.message} (${ip})`, additionalData);
}

@@ -116,0 +118,0 @@

{
"name": "@firstfleet/fferrorhandler",
"version": "2.1.6",
"version": "2.1.7",
"description": "handle errors",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -31,3 +31,5 @@ const middleware = require("../middleware");

thing: "two"
}
},
headers: {},
ip: '10.10.10.10'
};

@@ -107,3 +109,3 @@

`${mockReq.method} - ${mockReq.originalUrl}`,
operationalError.message,
`${httpError.message} (${mockReq.ip})`,
operationalError.data

@@ -122,3 +124,3 @@ );

`${mockReq.method} - ${mockReq.originalUrl}`,
httpError.message,
`${httpError.message} (${mockReq.ip})`,
httpError.data

@@ -172,3 +174,3 @@ );

`${mockReq.method} - ${mockReq.originalUrl}`,
httpError.message,
`${httpError.message} (${mockReq.ip})`,
parseMockData

@@ -175,0 +177,0 @@ );