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

@vechain/sdk-logging

Package Overview
Dependencies
Maintainers
8
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vechain/sdk-logging - npm Package Compare versions

Comparing version 1.0.0-beta.24 to 1.0.0-beta.25

13

dist/index.d.ts

@@ -1,2 +0,2 @@

import { ErrorCode, DataType } from '@vechain/sdk-errors';
import { ErrorCode, DataType, VechainSDKError } from '@vechain/sdk-errors';

@@ -43,8 +43,3 @@ /**

*
* VeChainSDKLogger('error').log({
* errorCode: DATA.INVALID_DATA_TYPE,
* errorMessage: 'Message we want to use for invalid data type ...',
* errorData: input,
* innerError: new Error('This is the inner error')
* });
* VeChainSDKLogger('error').log(new JSONRPCInternalError('test-method', -32603, `Error on request`, { some: 'data' }));
*

@@ -56,5 +51,3 @@ */

? {
log: <TErrorCode extends ErrorCode>(
error: ErrorLoggerData<TErrorCode>
) => void;
log: <TErrorData>(error: VechainSDKError<TErrorData>) => void;
}

@@ -61,0 +54,0 @@ : // Logger function type used for 'log' logs

@@ -52,7 +52,7 @@ "use strict";

`
****************** ERROR: ${error.errorCode} ******************
****************** ERROR ON: ${error.methodName} ******************
- Error message: '${error.errorMessage}'
- Error data:
`,
error.errorData,
error.data,
`

@@ -59,0 +59,0 @@ - Internal error:

{
"name": "@vechain/sdk-logging",
"version": "1.0.0-beta.24",
"version": "1.0.0-beta.25",
"description": "This module provides functionality to logging data for vechain-sdk",

@@ -36,4 +36,4 @@ "author": "vechain Foundation",

"dependencies": {
"@vechain/sdk-errors": "1.0.0-beta.24"
"@vechain/sdk-errors": "1.0.0-beta.25"
}
}

@@ -1,3 +0,3 @@

import type { ErrorLoggerData, LogFunctionType } from '../types';
import type { ErrorCode } from '@vechain/sdk-errors';
import type { LogFunctionType } from '../types';
import { type VechainSDKError } from '@vechain/sdk-errors';

@@ -8,8 +8,8 @@ /**

const _logErrorFunction: LogFunctionType<'error'> = {
log: <TErrorCode extends ErrorCode>(error: ErrorLoggerData<TErrorCode>) => {
log: <TErrorData>(error: VechainSDKError<TErrorData>) => {
console.error(
`\n****************** ERROR: ${error.errorCode} ******************\n` +
`\n****************** ERROR ON: ${error.methodName} ******************\n` +
`- Error message: '${error.errorMessage}'` +
'\n- Error data:\n',
error.errorData,
error.data,
`\n- Internal error:\n`,

@@ -16,0 +16,0 @@ error.innerError,

@@ -1,2 +0,6 @@

import { type DataType, type ErrorCode } from '@vechain/sdk-errors';
import {
type DataType,
type ErrorCode,
type VechainSDKError
} from '@vechain/sdk-errors';

@@ -43,8 +47,3 @@ /**

*
* VeChainSDKLogger('error').log({
* errorCode: DATA.INVALID_DATA_TYPE,
* errorMessage: 'Message we want to use for invalid data type ...',
* errorData: input,
* innerError: new Error('This is the inner error')
* });
* VeChainSDKLogger('error').log(new JSONRPCInternalError('test-method', -32603, `Error on request`, { some: 'data' }));
*

@@ -56,5 +55,3 @@ */

? {
log: <TErrorCode extends ErrorCode>(
error: ErrorLoggerData<TErrorCode>
) => void;
log: <TErrorData>(error: VechainSDKError<TErrorData>) => void;
}

@@ -61,0 +58,0 @@ : // Logger function type used for 'log' logs

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