New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

grpc-boom

Package Overview
Dependencies
Maintainers
1
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grpc-boom - npm Package Compare versions

Comparing version 0.0.17 to 0.0.18

2

index.d.ts

@@ -38,4 +38,2 @@ export = GrpcBoom;

ctor?: (message: string, data: any) => any;
/** an option with extra properties to set on the error object. */
decorate?: any;
/** message - the error message derived from error.message. */

@@ -42,0 +40,0 @@ message?: string | Error;

2

package.json
{
"name": "grpc-boom",
"version": "0.0.17",
"version": "0.0.18",
"description": "A gRPC implementation of the awesome Boom library to help create gRPC-friendly error objects",

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

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

}
constructor(message, options, errorOnly) {
constructor(message, options) {
super(message);

@@ -37,11 +37,3 @@ const { code, data, ctor } = options ? options : { code: 13, data: null, ctor: GrpcBoom };

error.serverError = this.serverError;
if (errorOnly) {
return error;
}
Error.captureStackTrace(error, ctor);
error.typeof = ctor;
if (options && options.decorate) {
Object.assign(error, options.decorate);
}
this.initialize(error, code ? code : 13, message);
return error;

@@ -57,9 +49,6 @@ }

options = options || {};
const grpcBoomInstance = new GrpcBoom('Instance', undefined, true);
const grpcBoomInstance = new GrpcBoom('An internal server error occurred');
if (options.data !== undefined) {
err.data = options.data;
}
if (options.decorate) {
Object.assign(err, options.decorate);
}
if (!err.isBoom) {

@@ -126,3 +115,7 @@ return grpcBoomInstance.initialize(err, options.code || 13, options.message || err.message || err.output.payload.message);

static create(message, code, data) {
const grpcBoom = new GrpcBoom(message, { code: 16, data, ctor: GrpcBoom.unauthenticated }, false);
const grpcBoom = new GrpcBoom(message, {
code: 16,
data,
ctor: GrpcBoom.unauthenticated
});
return grpcBoom.initialize(grpcBoom, code, message);

@@ -129,0 +122,0 @@ }

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