Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@venncity/errors

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@venncity/errors - npm Package Compare versions

Comparing version 1.7.16-addSentry.32 to 1.7.16-addSentry.33

9

lib/cjs/formatError/formatError.js

@@ -19,5 +19,14 @@ "use strict";

sentry_1.reportErrorToSentry(e, { level: logLevel, tags: { traceId: e.traceId }, contexts: { errorThrown: errorToThrow } });
// Since this is a sync function we cannot await the reportErrorToSentry call.
// flushing to sentry takes time so we need to wait here in a sync manner
sleepSync(2000);
return errorToThrow;
}
exports.handleErrorThrown = handleErrorThrown;
function sleepSync(ms) {
console.log('Sleeping for ', ms, ' millis');
const start = new Date().getTime();
const expire = start + ms;
while (new Date().getTime() < expire) { }
}
function getLogLevelFromError(e) {

@@ -24,0 +33,0 @@ return e.logLevel || ERROR;

@@ -16,4 +16,13 @@ import { v4 as uuidv4 } from 'uuid';

reportErrorToSentry(e, { level: logLevel, tags: { traceId: e.traceId }, contexts: { errorThrown: errorToThrow } });
// Since this is a sync function we cannot await the reportErrorToSentry call.
// flushing to sentry takes time so we need to wait here in a sync manner
sleepSync(2000);
return errorToThrow;
}
function sleepSync(ms) {
console.log('Sleeping for ', ms, ' millis');
const start = new Date().getTime();
const expire = start + ms;
while (new Date().getTime() < expire) { }
}
function getLogLevelFromError(e) {

@@ -20,0 +29,0 @@ return e.logLevel || ERROR;

6

package.json
{
"name": "@venncity/errors",
"version": "1.7.16-addSentry.32+75257c77b",
"version": "1.7.16-addSentry.33+6e346ab71",
"author": "Venn Engineering",

@@ -36,3 +36,3 @@ "main": "lib/cjs/index.js",

"@sentry/types": "^5.21.1",
"@venncity/nested-config": "^2.0.24-addSentry.32+75257c77b",
"@venncity/nested-config": "^2.0.24-addSentry.33+6e346ab71",
"fast-safe-stringify": "^2.0.7",

@@ -44,3 +44,3 @@ "joi": "^14.3.1",

},
"gitHead": "75257c77b902c481ba014fd57b22bc71f92aebca"
"gitHead": "6e346ab71d48a873546ca9dc54be47d4805fb3e0"
}

@@ -20,7 +20,19 @@ import { v4 as uuidv4 } from 'uuid';

reportErrorToSentry(e, { level: logLevel, tags: { traceId: e.traceId }, contexts: { errorThrown: errorToThrow } });
// Since this is a sync function we cannot await the reportErrorToSentry call.
// flushing to sentry takes time so we need to wait here in a sync manner
sleepSync(2000);
return errorToThrow;
}
function sleepSync(ms) {
console.log('Sleeping for ', ms, ' millis');
const start = new Date().getTime();
const expire = start + ms;
while (new Date().getTime() < expire) { }
}
function getLogLevelFromError(e) {
return e.logLevel || ERROR;
}
function generateUUID() {

@@ -27,0 +39,0 @@ return uuidv4();

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc