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

json-rpc-engine

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-rpc-engine - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

7

package.json
{
"name": "json-rpc-engine",
"version": "3.1.0",
"version": "3.2.0",
"description": "a tool for processing JSON RPC",

@@ -21,3 +21,4 @@ "main": "src/index.js",

"babel-preset-env": "^1.3.2",
"babelify": "^7.3.0"
"babelify": "^7.3.0",
"json-rpc-error": "^2.0.0"
},

@@ -54,2 +55,2 @@ "browserify": {

]
}
}
'use strict'
const async = require('async')
const JsonRpcError = require('json-rpc-error')

@@ -38,3 +39,8 @@ class RpcEngine {

this._runMiddleware(req, res, (err, isComplete) => {
if (err) return cb(err)
if (err) {
// prepare error message
res.error = new JsonRpcError.InternalError(err)
// return error-first and res with err
return cb(err, res)
}
// fail if not completed

@@ -41,0 +47,0 @@ if (!isComplete) {

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