@beforeyoubid/error-adapter
Advanced tools
Comparing version 1.0.25 to 1.0.26
@@ -56,3 +56,3 @@ "use strict"; | ||
const code = utils_1.convertErrorToCode(err); | ||
// Error will be a GraphQL error if formatting error using a GraphQL Federations | ||
// Error will be a GraphQL error if formatting error using a GraphQL Federation | ||
if (err instanceof Error && !(err instanceof graphql_1.GraphQLError)) { | ||
@@ -59,0 +59,0 @@ sentry_1.Sentry.captureException(err); |
@@ -10,13 +10,9 @@ "use strict"; | ||
const handleBeforeSend = (_event, hint) => { | ||
console.log('before send'); | ||
const { originalException: error } = hint; | ||
const code = utils_1.convertErrorToCode(error); | ||
console.log('code', code); | ||
if (!constants_1.errorTypesForSentry.includes(code)) { | ||
console.log('not returning error'); | ||
return null; | ||
} | ||
console.log('returning error'); | ||
return _event; | ||
}; | ||
exports.handleBeforeSend = handleBeforeSend; |
@@ -10,6 +10,3 @@ "use strict"; | ||
const convertErrorToCode = (error) => { | ||
console.log('convertErrorToCode'); | ||
console.log('error', error); | ||
const { constructor } = error || {}; | ||
console.log('constructor', constructor); | ||
switch (constructor) { | ||
@@ -16,0 +13,0 @@ case errors_1.NotAuthenticated: |
{ | ||
"name": "@beforeyoubid/error-adapter", | ||
"version": "1.0.25", | ||
"version": "1.0.26", | ||
"description": "A module to standardize error handling across the BYB platform", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
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
0
67475
1247