{"_id":"json-rpc-error","_rev":"7-04f294029744d1053b5a797fb1cdd2ae","name":"json-rpc-error","description":"JSON RPC 2.0 Errors.","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"json-rpc-error","version":"1.0.0","description":"JSON RPC 2.0 Errors.","main":"index.js","scripts":{"test":"./node_modules/mocha/bin/mocha --check-leaks --reporter spec --bail ./test --recursive --watch","test-cov":"./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks ./test --recursive"},"repository":{"type":"git","url":"git+https://github.com/claudijo/json-rpc-error.git"},"keywords":["json","rpc","error"],"author":{"name":"Claudijo Borovic","email":"hello@claudijo.com"},"license":"MIT","bugs":{"url":"https://github.com/claudijo/json-rpc-error/issues"},"homepage":"https://github.com/claudijo/json-rpc-error","dependencies":{"inherits":"^2.0.1"},"files":["LICENSE","index.js"],"devDependencies":{"istanbul":"^0.3.17","mocha":"^2.2.5"},"gitHead":"bbbcaadd9202dbd58494a507b799737cb591503a","_id":"json-rpc-error@1.0.0","_shasum":"b988afa1774dbf99a39fc74f331a0af48003a657","_from":".","_npmVersion":"2.11.0","_nodeVersion":"0.10.36","_npmUser":{"name":"claudijo","email":"claudijo.borovic@gmail.com"},"maintainers":[{"name":"claudijo","email":"claudijo.borovic@gmail.com"}],"dist":{"shasum":"b988afa1774dbf99a39fc74f331a0af48003a657","tarball":"https://registry.npmjs.org/json-rpc-error/-/json-rpc-error-1.0.0.tgz","integrity":"sha512-71m3KXCxvDv33RzEKOPi4h/UGwOAspEdedKWh6M0FlnpaXLLarLckrERianCq8f2i03KdwcViyM2IYpO5sRpmA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDihwqg1j0lByrpHfc4fZNpJQKWNbK+nvCUNgfJXfwCswIhAL9UJRYPvmWj0UuiZSD25gwNnq8ZdX6asT4C0qGtRa7a"}]}},"1.0.1":{"name":"json-rpc-error","version":"1.0.1","description":"JSON RPC 2.0 Errors.","main":"index.js","scripts":{"test":"./node_modules/mocha/bin/mocha --check-leaks --reporter spec --bail ./test --recursive --watch","test-cov":"./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks ./test --recursive"},"repository":{"type":"git","url":"git+https://github.com/claudijo/json-rpc-error.git"},"keywords":["json","rpc","error"],"author":{"name":"Claudijo Borovic","email":"hello@claudijo.com"},"license":"MIT","bugs":{"url":"https://github.com/claudijo/json-rpc-error/issues"},"homepage":"https://github.com/claudijo/json-rpc-error","dependencies":{"inherits":"^2.0.1"},"files":["LICENSE","index.js","lib"],"devDependencies":{"istanbul":"^0.3.17","mocha":"^2.2.5"},"gitHead":"8eb9faa806200a095d506af8960f7831a9113f97","_id":"json-rpc-error@1.0.1","_shasum":"3a549278fc7e2c5033e7565d8083784f62184619","_from":".","_npmVersion":"2.11.0","_nodeVersion":"0.10.36","_npmUser":{"name":"claudijo","email":"claudijo.borovic@gmail.com"},"maintainers":[{"name":"claudijo","email":"claudijo.borovic@gmail.com"}],"dist":{"shasum":"3a549278fc7e2c5033e7565d8083784f62184619","tarball":"https://registry.npmjs.org/json-rpc-error/-/json-rpc-error-1.0.1.tgz","integrity":"sha512-QKH3hc/R0ySx4jkg8jkpul0mQ16BEWEhD/uFYVlDJTewOIV5iE1rBaPJ5bmvrHe21iIW0C3oXXUcVQ9e8+zH/A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6N3W4xRwQoV8m0X4A37+fDRcHyTo4vB42r/BxCzS+6gIgSSer2AdqhF2x/Ixx+Ke1GarEVH9iGwTC6UMn8tGvZlw="}]}},"1.0.2":{"name":"json-rpc-error","version":"1.0.2","description":"JSON RPC 2.0 Errors.","main":"index.js","scripts":{"test":"./node_modules/mocha/bin/mocha --check-leaks --reporter spec --bail ./test --recursive --watch","test-cov":"./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks ./test --recursive"},"repository":{"type":"git","url":"git+https://github.com/claudijo/json-rpc-error.git"},"keywords":["json","rpc","error"],"author":{"name":"Claudijo Borovic","email":"hello@claudijo.com"},"license":"MIT","bugs":{"url":"https://github.com/claudijo/json-rpc-error/issues"},"homepage":"https://github.com/claudijo/json-rpc-error","dependencies":{"inherits":"^2.0.1"},"files":["LICENSE","index.js","lib"],"devDependencies":{"istanbul":"^0.3.17","mocha":"^2.2.5"},"gitHead":"05f2856bf8063065e5d112ee3ac6544378ec6422","_id":"json-rpc-error@1.0.2","_shasum":"460174bd74354ddbe54322282ff471b3ae11d26c","_from":".","_npmVersion":"2.11.0","_nodeVersion":"0.10.36","_npmUser":{"name":"claudijo","email":"claudijo.borovic@gmail.com"},"maintainers":[{"name":"claudijo","email":"claudijo.borovic@gmail.com"}],"dist":{"shasum":"460174bd74354ddbe54322282ff471b3ae11d26c","tarball":"https://registry.npmjs.org/json-rpc-error/-/json-rpc-error-1.0.2.tgz","integrity":"sha512-FYqDPuGcWQqNUqsU95OlNJAmrys9tFiUWPaNUfR/X3eAWeDsl9A6AaHRLxN4gX6UrdvdKy16q7y9fOYdA5jlWg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCBAm5hNmvNKFpW+ys22oZO8w6/QPYoi7ovuBbo1vsVGAIhAPSnyyw6AFvPQFCJrcHtFLfJNWpOfNtgzNu+f0ENXOeG"}]}},"1.0.3":{"name":"json-rpc-error","version":"1.0.3","description":"JSON RPC 2.0 Errors.","main":"index.js","scripts":{"test":"./node_modules/mocha/bin/mocha --check-leaks --reporter spec --bail ./test --recursive --watch","test-cov":"./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks ./test --recursive"},"repository":{"type":"git","url":"git+https://github.com/claudijo/json-rpc-error.git"},"keywords":["json","rpc","error"],"author":{"name":"Claudijo Borovic","email":"hello@claudijo.com"},"license":"MIT","bugs":{"url":"https://github.com/claudijo/json-rpc-error/issues"},"homepage":"https://github.com/claudijo/json-rpc-error","dependencies":{"inherits":"^2.0.1"},"files":["LICENSE","index.js","lib"],"devDependencies":{"istanbul":"^0.3.17","mocha":"^2.2.5"},"gitHead":"f874cd2b191ad7808cb13c14c42f675045b46dc1","_id":"json-rpc-error@1.0.3","_shasum":"4409f98d9abf19671205639935fc731203c34482","_from":".","_npmVersion":"2.11.0","_nodeVersion":"0.10.36","_npmUser":{"name":"claudijo","email":"claudijo.borovic@gmail.com"},"maintainers":[{"name":"claudijo","email":"claudijo.borovic@gmail.com"}],"dist":{"shasum":"4409f98d9abf19671205639935fc731203c34482","tarball":"https://registry.npmjs.org/json-rpc-error/-/json-rpc-error-1.0.3.tgz","integrity":"sha512-32JT5CyJKylOspQ1Y7DlK25SSUHKHXEt9DJVmjW/15YcTjQn1YmFgpithQpaDHhLDQWKduX8dgUJZtUwi4HA9g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1T76kaZB+vFg3PSEGJgDyt0P+ohRrFXsifFpFJJ1vSgIgEvzTqmoaQtI3ucVL33v9yaVuomclObLho5IQDaA27oA="}]}},"2.0.0":{"name":"json-rpc-error","version":"2.0.0","description":"JSON RPC 2.0 Errors.","main":"index.js","scripts":{"test":"./node_modules/mocha/bin/mocha --check-leaks --reporter spec --bail ./test --recursive --watch","test-cov":"./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks ./test --recursive"},"repository":{"type":"git","url":"git+https://github.com/claudijo/json-rpc-error.git"},"keywords":["json","rpc","error"],"author":{"name":"Claudijo Borovic","email":"hello@claudijo.com"},"license":"MIT","bugs":{"url":"https://github.com/claudijo/json-rpc-error/issues"},"homepage":"https://github.com/claudijo/json-rpc-error","dependencies":{"inherits":"^2.0.1"},"files":["LICENSE","index.js","lib"],"devDependencies":{"istanbul":"^0.3.17","mocha":"^2.2.5"},"gitHead":"7112cf003974b0dc505e2d4314a041369e91b5f3","_id":"json-rpc-error@2.0.0","_shasum":"a7af9c202838b5e905c7250e547f1aff77258a02","_from":".","_npmVersion":"2.11.0","_nodeVersion":"0.10.36","_npmUser":{"name":"claudijo","email":"claudijo.borovic@gmail.com"},"maintainers":[{"name":"claudijo","email":"claudijo.borovic@gmail.com"}],"dist":{"shasum":"a7af9c202838b5e905c7250e547f1aff77258a02","tarball":"https://registry.npmjs.org/json-rpc-error/-/json-rpc-error-2.0.0.tgz","integrity":"sha512-EwUeWP+KgAZ/xqFpaP6YDAXMtCJi+o/QQpCQFIYyxr01AdADi2y413eM8hSqJcoQym9WMePAJWoaODEJufC4Ug==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGZpO86Apn47bl+/xEBR8ouznF4oHwWr3LA/Al33G0TSAiAI243Fl2y7DgzNky66peJIXmi8eaS/Bu/0PvGR6N+8Vg=="}]}}},"readme":"# JSON RPC 2.0 Error\n\nError constructors for JSON RPC 2.0 errors as described in the\n[JSON-RPC 2.0 Error Specification]\n(http://www.jsonrpc.org/specification#error_object)\n\n| code             | message          | meaning                                                                                               |\n|------------------|------------------|-------------------------------------------------------------------------------------------------------|\n| -32700           | Parse error      | Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text. |\n| -32600           | Invalid Request  | The JSON sent is not a valid Request object.                                                          |\n| -32601           | Method not found | The method does not exist / is not available.                                                         |\n| -32602           | Invalid params   | Invalid method parameter(s).                                                                          |\n| -32603           | Internal error   | Internal JSON-RPC error.                                                                              |\n| -32000 to -32099 | Server error     | Reserved for implementation-defined server-errors.                                                    |\n\nSpecific errors are instances of the base constructor `JsonRpcError`, which in\nturn is an instance of the native JavaScript Error object.\n\nEach error can be constructed with or without the `new` keyword, for example\n\n`var err = new JsonRpcError.ParseError();`\n\nis the same as\n\n`var err = JsonRpcError.ParseError();`\n\nAlso see related packages [json-rpc-response](https://github.com/claudijo/json-rpc-response),\n[json-rpc-request](https://github.com/claudijo/json-rpc-request), and\n[json-rpc-notification](https://github.com/claudijo/json-rpc-notification)\n\n## Usage\n\nImport the JSON RPC 2.0 error module:\n\n```js\nvar JsonRpcError = require('json-rpc-error');\n```\n\n### JsonRpcError\nGeneral base constructor for JSON RPC 2 errors:\n\n```js\nnew JsonRpcError(message, code[, data]);\n```\n\n### Parse error\nInvalid JSON was received by the server.\n\n```js\nnew JsonRpcError.ParseError();\n```\n\n### Invalid Request\nThe JSON sent is not a valid Request object.\n\n```js\nnew JsonRpcError.InvalidRequest();\n```\n\n### Method not found\nThe method does not exist / is not available.\n\n```js\nnew JsonRpcError.MethodNotFound();\n```\n\n### Invalid params\nInvalid method parameter(s).\n\n```js\nnew JsonRpcError.InvalidParams();\n```\n\n### Internal error\nInternal JSON-RPC error. The constructor can take an optional error object, in\nwhich case the error's `message` property will be passed on.\n\n```js\nnew JsonRpcError.InternalError([error]);\n```\n\n### Server Error\nReserved for implementation-defined server-errors. Provided error code must be\nin the range -32000 to -32099.\n\n```js\nnew JsonRpcError.ServerError(code);\n```\n\n## Test\n\nRun unit tests:\n\n`$ npm test`\n\nCreate test coverage report:\n\n`$ npm run-script test-cov`\n\n# License\n\n[MIT](LICENSE)\n\n\n","maintainers":[{"name":"claudijo","email":"claudijo.borovic@gmail.com"}],"time":{"modified":"2022-06-19T06:22:46.798Z","created":"2015-07-23T23:51:37.645Z","1.0.0":"2015-07-23T23:51:37.645Z","1.0.1":"2015-07-24T00:06:30.292Z","1.0.2":"2015-07-29T13:43:08.289Z","1.0.3":"2015-07-30T11:33:29.942Z","2.0.0":"2015-07-30T13:48:44.065Z"},"homepage":"https://github.com/claudijo/json-rpc-error","keywords":["json","rpc","error"],"repository":{"type":"git","url":"git+https://github.com/claudijo/json-rpc-error.git"},"author":{"name":"Claudijo Borovic","email":"hello@claudijo.com"},"bugs":{"url":"https://github.com/claudijo/json-rpc-error/issues"},"license":"MIT","readmeFilename":"README.md"}