@nimiq/rpc
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -545,2 +545,8 @@ 'use strict'; | ||
console.debug('RpcServer REPLY', result); | ||
if (status === exports.ResponseStatus.ERROR) { | ||
// serialize error objects | ||
result = typeof result === 'object' | ||
? { message: result.message, stack: result.stack } | ||
: { message: result }; | ||
} | ||
if (this._postMessage) { | ||
@@ -583,5 +589,3 @@ // Send via postMessage (e.g., popup) | ||
static _error(state, error) { | ||
state.reply(exports.ResponseStatus.ERROR, error.message | ||
? { message: error.message, stack: error.stack } | ||
: { message: error }); | ||
state.reply(exports.ResponseStatus.ERROR, error); | ||
} | ||
@@ -588,0 +592,0 @@ constructor(allowedOrigin) { |
@@ -547,2 +547,8 @@ (function (global, factory) { | ||
console.debug('RpcServer REPLY', result); | ||
if (status === exports.ResponseStatus.ERROR) { | ||
// serialize error objects | ||
result = typeof result === 'object' | ||
? { message: result.message, stack: result.stack } | ||
: { message: result }; | ||
} | ||
if (this._postMessage) { | ||
@@ -585,5 +591,3 @@ // Send via postMessage (e.g., popup) | ||
static _error(state, error) { | ||
state.reply(exports.ResponseStatus.ERROR, error.message | ||
? { message: error.message, stack: error.stack } | ||
: { message: error }); | ||
state.reply(exports.ResponseStatus.ERROR, error); | ||
} | ||
@@ -590,0 +594,0 @@ constructor(allowedOrigin) { |
{ | ||
"name": "@nimiq/rpc", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "RPC Client/Server", | ||
@@ -5,0 +5,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68654
1472
1