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 2.1.1 to 2.1.2

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [2.1.2](https://github.com/venn-city/npm-shelf/compare/@venncity/errors@2.1.1...@venncity/errors@2.1.2) (2021-02-23)
**Note:** Version bump only for package @venncity/errors
## [2.1.1](https://github.com/venn-city/npm-shelf/compare/@venncity/errors@2.1.0...@venncity/errors@2.1.1) (2021-02-15)

@@ -8,0 +16,0 @@

2

lib/cjs/errorHandler/errorHandler.js

@@ -35,3 +35,3 @@ "use strict";

const namespace = cls_hooked_1.default.getNamespace(config.get('clsNamespace.sequelize'));
if (namespace) {
if (namespace && namespace.active) {
namespace.set('error', error);

@@ -38,0 +38,0 @@ }

@@ -11,3 +11,3 @@ import * as Sentry from '@sentry/node';

};
export declare function buildTags(event: Pick<APIGatewayProxyEvent, 'headers'>, { impersonated, isPublicAccess, isService, id, email }: AuthDetailsFromRequest, context?: Pick<LambdaContext, 'awsRequestId' | 'functionVersion'>): Record<string, string>;
export declare function buildTags(event: Pick<APIGatewayProxyEvent, 'headers'>, { impersonated, isPublicAccess, isService, id, email }?: AuthDetailsFromRequest, context?: Pick<LambdaContext, 'awsRequestId' | 'functionVersion'>): Record<string, string>;
export declare function buildErrorContexts(event: Pick<APIGatewayProxyEvent, 'body'> & {

@@ -14,0 +14,0 @@ Records?: any;

@@ -78,3 +78,3 @@ "use strict";

// eslint-disable-next-line max-len
function buildTags(event, { impersonated, isPublicAccess, isService, id, email }, context) {
function buildTags(event, { impersonated, isPublicAccess, isService, id, email } = {}, context) {
const tags = {};

@@ -81,0 +81,0 @@ const { headers } = event;

@@ -101,2 +101,7 @@ "use strict";

});
test('No authDetails passed', () => {
// @ts-ignore
const tags = sentry.buildTags(testEvents.httpEvent, undefined, null);
expect(tags).toMatchSnapshot();
});
});

@@ -103,0 +108,0 @@ describe('buildErrorContexts', () => {

@@ -28,3 +28,3 @@ var __rest = (this && this.__rest) || function (s, e) {

const namespace = cls.getNamespace(config.get('clsNamespace.sequelize'));
if (namespace) {
if (namespace && namespace.active) {
namespace.set('error', error);

@@ -31,0 +31,0 @@ }

@@ -11,3 +11,3 @@ import * as Sentry from '@sentry/node';

};
export declare function buildTags(event: Pick<APIGatewayProxyEvent, 'headers'>, { impersonated, isPublicAccess, isService, id, email }: AuthDetailsFromRequest, context?: Pick<LambdaContext, 'awsRequestId' | 'functionVersion'>): Record<string, string>;
export declare function buildTags(event: Pick<APIGatewayProxyEvent, 'headers'>, { impersonated, isPublicAccess, isService, id, email }?: AuthDetailsFromRequest, context?: Pick<LambdaContext, 'awsRequestId' | 'functionVersion'>): Record<string, string>;
export declare function buildErrorContexts(event: Pick<APIGatewayProxyEvent, 'body'> & {

@@ -14,0 +14,0 @@ Records?: any;

@@ -55,3 +55,3 @@ import { pick, get } from 'lodash';

// eslint-disable-next-line max-len
export function buildTags(event, { impersonated, isPublicAccess, isService, id, email }, context) {
export function buildTags(event, { impersonated, isPublicAccess, isService, id, email } = {}, context) {
const tags = {};

@@ -58,0 +58,0 @@ const { headers } = event;

@@ -80,2 +80,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

});
test('No authDetails passed', () => {
// @ts-ignore
const tags = sentry.buildTags(testEvents.httpEvent, undefined, null);
expect(tags).toMatchSnapshot();
});
});

@@ -82,0 +87,0 @@ describe('buildErrorContexts', () => {

{
"name": "@venncity/errors",
"version": "2.1.1",
"version": "2.1.2",
"author": "Venn Engineering",

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

"@sentry/types": "^5.22.3",
"@venncity/nested-config": "^3.1.6",
"@venncity/nested-config": "^3.1.7",
"@venncity/schema-consts": "^4.1.9",

@@ -46,3 +46,3 @@ "cls-hooked": "^4.2.2",

},
"gitHead": "6ff0cfd035866be44b762144c32b8adfdde9f2c7"
"gitHead": "e83432b233b00f1ce7578780864f534b455eb37f"
}

@@ -20,3 +20,3 @@ import jsonStringify from 'fast-safe-stringify';

const namespace = cls.getNamespace(config.get('clsNamespace.sequelize'));
if (namespace) {
if (namespace && namespace.active) {
namespace.set('error', error);

@@ -23,0 +23,0 @@ }

@@ -77,2 +77,7 @@ import * as sentry from './sentry';

});
test('No authDetails passed', () => {
// @ts-ignore
const tags = sentry.buildTags(testEvents.httpEvent, undefined, null);
expect(tags).toMatchSnapshot();
});
});

@@ -79,0 +84,0 @@

@@ -74,3 +74,3 @@ import { pick, get } from 'lodash';

// eslint-disable-next-line max-len
export function buildTags(event: Pick<APIGatewayProxyEvent, 'headers'>, { impersonated, isPublicAccess, isService, id, email }: AuthDetailsFromRequest, context?: Pick<LambdaContext, 'awsRequestId' | 'functionVersion'>) {
export function buildTags(event: Pick<APIGatewayProxyEvent, 'headers'>, { impersonated, isPublicAccess, isService, id, email }: AuthDetailsFromRequest = {}, context?: Pick<LambdaContext, 'awsRequestId' | 'functionVersion'>) {
const tags: Record<string, string> = {};

@@ -77,0 +77,0 @@ const { headers } = event;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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