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

@injectivelabs/exceptions

Package Overview
Dependencies
Maintainers
11
Versions
264
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@injectivelabs/exceptions - npm Package Compare versions

Comparing version 1.0.43 to 1.0.44

8

dist/exception.d.ts

@@ -16,2 +16,7 @@ import { Exception, ErrorType, ErrorContext, ErrorCode, ErrorContextCode } from './types';

/**
* Providing more context
* (ex: endpoint on http request)
*/
context?: string;
/**
* Providing more context as to where the exception was thrown

@@ -41,5 +46,6 @@ * (ex: on-chain module, etc)

parseError(error: Error): void;
parseContext(context?: ErrorContext): void;
parseContext(errorContext?: ErrorContext): void;
setType(type: ErrorType): void;
setCode(code: ErrorCode): void;
setContext(context: string): void;
setStack(stack: string): void;

@@ -46,0 +52,0 @@ setName(name: string): void;

10

dist/exception.js

@@ -42,8 +42,10 @@ "use strict";

}
parseContext(context) {
const { contextModule, type, code } = context || {
parseContext(errorContext) {
const { contextModule, type, code, context } = errorContext || {
contextModule: '',
context: '',
code: types_1.UnspecifiedErrorCode,
type: types_1.ErrorType.Unspecified,
};
this.context = context;
this.contextModule = contextModule;

@@ -59,2 +61,5 @@ this.type = type || types_1.ErrorType.Unspecified;

}
setContext(context) {
this.context = context;
}
setStack(stack) {

@@ -95,2 +100,3 @@ super.stack = stack;

type: this.type,
context: this.context,
contextModule: this.contextModule,

@@ -97,0 +103,0 @@ contextCode: this.contextCode,

@@ -7,4 +7,5 @@ import { ConcreteException } from '../exception';

method?: HttpRequestMethod;
endpoint?: string;
});
}
//# sourceMappingURL=HttpRequestException.d.ts.map

@@ -24,2 +24,9 @@ import { ErrorCode, ErrorContextCode } from './codes';

type?: ErrorType;
/**
* Additional context needed for the exception
*/
context?: string;
/**
* Where is the exception thrown
*/
contextModule?: string;

@@ -26,0 +33,0 @@ /**

{
"name": "@injectivelabs/exceptions",
"description": "List of exceptions that can be reused throughout Injective's projects.",
"version": "1.0.43",
"version": "1.0.44",
"license": "Apache-2.0",

@@ -40,3 +40,3 @@ "main": "dist/index.js",

},
"gitHead": "ecce6f88a5090ca1b67a261bf10183121710c5f5"
"gitHead": "56acd4e223db018fb34b390f16b84f107e0880f6"
}

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