@firstfleet/fferrorhandler
Advanced tools
| type SlackChannelName = 'alerts_dev' | 'alerts_critical' | 'alerts_mobileapp' | | ||
| 'alerts_nodejobs' | 'alerts_sql' | 'alerts_warning' | 'alerts_web' | 'alerts_workflow' | 'alerts_mobilecomm' | ||
| export { | ||
| SlackChannelName | ||
| } |
+3
-2
@@ -1,2 +0,3 @@ | ||
| import {SlackChannels, HttpErrorOptions} from './types' | ||
| import {HttpErrorOptions} from './types' | ||
| import { SlackChannelName } from './constants' | ||
@@ -8,3 +9,3 @@ declare class OperationalError extends Error { | ||
| declare class NonOperationalError extends Error { | ||
| constructor(message: string, data?: string, slackChannel?: SlackChannels, options?: {includeBody: boolean}) | ||
| constructor(message: string, data?: string, slackChannel?: SlackChannelName, options?: {includeBody: boolean}) | ||
| } | ||
@@ -11,0 +12,0 @@ |
+2
-2
@@ -1,3 +0,3 @@ | ||
| import { SlackChannels } from './types' | ||
| import {SlackChannelName} from './constants' | ||
| export function logAndNotify(appName: string, methodName: string, message: string, messageDetail: string, slackChannel?: SlackChannels): void | ||
| export function logAndNotify(appName: string, methodName: string, message: string, messageDetail: string, slackChannel?: SlackChannelName): void |
+1
-1
| { | ||
| "name": "@firstfleet/fferrorhandler", | ||
| "version": "2.1.4", | ||
| "version": "2.1.5", | ||
| "description": "handle errors", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
+15
-16
| import * as ErrorTypes from './errorTypes'; | ||
| import * as Handler from './handler'; | ||
| import * as Middleware from './middleware'; | ||
| import constants from './constants' | ||
| import { SlackChannelName} from './constants' | ||
| /** | ||
| * @see {@link constants.errorLevels} | ||
| */ | ||
| type ErrorLevels = 'common' | 'critical' | 'fatal' | ||
| /** | ||
| * @see {@link constants.slackChannels} | ||
| */ | ||
| type SlackChannels = 'alerts_dev' | 'alerts_critical' | 'alerts_mobileapp' | | ||
| 'alerts_nodejobs' | 'alerts_sql' | 'alerts_warning' | 'alerts_web' | 'alerts_workflow' | 'alerts_mobilecomm' | ||
| /**Slack Error Options */ | ||
| type SlackErrorOptions = {channel: SlackChannels, send: boolean} | ||
| type SlackErrorOptions = {channel: SlackChannelName, send: boolean} | ||
@@ -23,9 +14,16 @@ /**Http Error Options */ | ||
| declare namespace slackChannels { | ||
| let DEV: SlackChannelName | ||
| let CRITICAL: SlackChannelName | ||
| let MOBILE: SlackChannelName | ||
| let NODEJOBS: SlackChannelName | ||
| let SQL: SlackChannelName | ||
| let WARNING: SlackChannelName | ||
| let WEB: SlackChannelName | ||
| let WORKFLOW: SlackChannelName | ||
| let MOBILECOMM: SlackChannelName | ||
| } | ||
| export { | ||
| ErrorLevels, | ||
| SlackChannels, | ||
| SlackErrorOptions, | ||
@@ -35,3 +33,4 @@ HttpErrorOptions, | ||
| Handler, | ||
| Middleware | ||
| Middleware, | ||
| slackChannels | ||
| } |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
76289
0.44%20
5.26%1109
0.73%0
-100%