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

@golemio/errors

Package Overview
Dependencies
Maintainers
5
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@golemio/errors - npm Package Compare versions

Comparing version 2.0.0-dev.877231197 to 2.0.0-dev.878768479

2

dist/errors/AbstractGolemioError.d.ts

@@ -10,3 +10,3 @@ import { IGolemioErrorInfoType } from "./interfaces/GolemioErrorInterface";

toObject: () => IGolemioError;
private causeToString;
private infoToString;
}

@@ -11,6 +11,6 @@ "use strict";

+ this.message
+ `${this.info ? ` (${this.causeToString(this.info)})` : ``}`
+ `${this.info ? ` (${this.infoToString(this.info)})` : ``}`
+ `${process.env.NODE_ENV === "development" ? `\n ${this.stack}` : ``}`;
};
this.toObject = () => (Object.assign(Object.assign(Object.assign(Object.assign({ error_message: this.message }, (this.className && { error_class_name: this.className })), (this.status && { error_status: this.status })), this.info && { error_info: this.causeToString(this.info) }), (process.env.NODE_ENV === "development") && { error_stack: this.stack }));
this.toObject = () => (Object.assign(Object.assign(Object.assign(Object.assign({ error_message: this.message }, (this.className && { error_class_name: this.className })), (this.status && { error_status: this.status })), this.info && { error_info: this.infoToString(this.info) }), (process.env.NODE_ENV === "development") && { error_stack: this.stack }));
this.name = this.constructor.name;

@@ -23,11 +23,11 @@ this.message = message;

}
causeToString(cause) {
if (cause instanceof AbstractGolemioError) {
return cause.toString();
infoToString(info) {
if (info instanceof AbstractGolemioError) {
return info.toString();
}
else if (cause instanceof Error) {
return cause.message;
else if (info instanceof Error) {
return info.message;
}
else {
return typeof cause === "string" ? cause : JSON.stringify(cause);
return typeof info === "string" ? info : JSON.stringify(info);
}

@@ -34,0 +34,0 @@ }

@@ -8,3 +8,3 @@ export interface IGolemioError {

}
export interface ICustomError extends IGolemioError {
export interface ICustomErrorObject extends IGolemioError {
}

@@ -11,0 +11,0 @@ export declare type IGolemioErrorInfoType = Error | IGolemioErrorInfoObject | IGolemioErrorInfoObject[] | string;

{
"name": "@golemio/errors",
"version": "2.0.0-dev.877231197",
"version": "2.0.0-dev.878768479",
"description": "Library of Error classes of the Golemio Data Platform System",

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

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