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

grpc-shared

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grpc-shared - npm Package Compare versions

Comparing version 1.0.27 to 1.0.28

1

lib/shared/exceptions/error-codes.d.ts

@@ -6,1 +6,2 @@ export declare const BAD_REQUEST = "BAD_REQUEST";

export declare const UNHANDELED = "UNHANDELED";
export declare const INTERNAL_SERVER_ERROR = "INTERNAL_SERVER_ERROR";

3

lib/shared/exceptions/error-codes.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UNHANDELED = exports.RESOURCE_NOT_FOUND = exports.UNAUTHENTICATED = exports.UNAUTHORIZED = exports.BAD_REQUEST = void 0;
exports.INTERNAL_SERVER_ERROR = exports.UNHANDELED = exports.RESOURCE_NOT_FOUND = exports.UNAUTHENTICATED = exports.UNAUTHORIZED = exports.BAD_REQUEST = void 0;
exports.BAD_REQUEST = 'BAD_REQUEST';

@@ -9,1 +9,2 @@ exports.UNAUTHORIZED = 'UNAUTHORIZED';

exports.UNHANDELED = "UNHANDELED";
exports.INTERNAL_SERVER_ERROR = "INTERNAL_SERVER_ERROR";

@@ -20,7 +20,8 @@ "use strict";

return next.handle().pipe((0, operators_1.catchError)((err) => {
var _a, _b;
const message = grpc_exceptions_1.GrpcException.composeLocalizedMessage("Unkown Error");
const service = process.env.npm_package_name;
const generatedMetadata = grpc_exceptions_1.GrpcException.generateExceptionMetadata(error_codes_1.UNHANDELED, message, service);
let metadata = err.metadata;
let code = err.code;
let metadata = err.metadata || ((_a = err === null || err === void 0 ? void 0 : err.error) === null || _a === void 0 ? void 0 : _a.metadata);
let code = err.code || ((_b = err === null || err === void 0 ? void 0 : err.code) === null || _b === void 0 ? void 0 : _b.code);
if (!err.metadata) {

@@ -27,0 +28,0 @@ metadata = generatedMetadata;

{
"name": "grpc-shared",
"version": "1.0.27",
"version": "1.0.28",
"description": "shared logic between services",

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

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