Comparing version 0.1.0-alpha.4 to 0.1.0-alpha.5
@@ -0,1 +1,8 @@ | ||
class MetacomError extends Error { | ||
constructor(message, code) { | ||
super(message); | ||
this.code = code; | ||
} | ||
} | ||
export class Metacom { | ||
@@ -17,5 +24,4 @@ constructor(url) { | ||
if (packet.error) { | ||
const { code, message } = packet.error; | ||
const error = new Error(message); | ||
error.code = code; | ||
const { message, code } = packet.error; | ||
const error = new MetacomError(message, code); | ||
reject(error); | ||
@@ -22,0 +28,0 @@ return; |
{ | ||
"name": "metacom", | ||
"version": "0.1.0-alpha.4", | ||
"version": "0.1.0-alpha.5", | ||
"author": "Timur Shemsedinov <timur.shemsedinov@gmail.com>", | ||
@@ -5,0 +5,0 @@ "description": "Communication protocol for Metarhia stack with rpc, events, binary streams, memory and db access", |
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
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
17563
461