From 5bcfdc853b2ff5a2390da3de30b006f85f5c837c Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Sat, 10 Jun 2017 20:42:29 +0000 Subject: Release of version 1.1.2. --- docs/global.html | 16 ++++++++-------- docs/index.html | 2 +- docs/index.js.html | 12 +++++++++--- 3 files changed, 18 insertions(+), 12 deletions(-) (limited to 'docs') diff --git a/docs/global.html b/docs/global.html index a04aacb..4a70079 100644 --- a/docs/global.html +++ b/docs/global.html @@ -395,7 +395,7 @@
Source:
@@ -632,7 +632,7 @@
Source:
@@ -792,7 +792,7 @@
Source:
@@ -952,7 +952,7 @@
Source:
@@ -1112,7 +1112,7 @@
Source:
@@ -1268,7 +1268,7 @@
Source:
@@ -1428,7 +1428,7 @@
Source:
@@ -1635,7 +1635,7 @@
diff --git a/docs/index.html b/docs/index.html index 8333d77..1e6b066 100644 --- a/docs/index.html +++ b/docs/index.html @@ -57,7 +57,7 @@
diff --git a/docs/index.js.html b/docs/index.js.html index 1916ba5..467ffac 100644 --- a/docs/index.js.html +++ b/docs/index.js.html @@ -69,7 +69,10 @@ function connect(uuid, callback) { const request = http.request(query, function(response) { var json = ''; response.on('data', (raw) => json = decryptJSON(raw)); - response.on('end', () => callback(json.result)); + response.on('end', () => { + if (json.error) throw new Error(json.error.message); + callback(json.result); + }); }); request.on('error', (error) => Error(error.message)); @@ -100,7 +103,10 @@ function send(raw, callback) { const request = http.request(query, function(response) { var json = ''; response.on('data', (raw) => json = decryptJSON(raw)); - response.on('end', () => callback(json.result)); + response.on('end', () => { + if (json.error) throw new Error(json.error.message); + callback(json.result); + }); }); request.on('error', (error) => Error(error)); @@ -219,7 +225,7 @@ function isVerification(data) {
-- cgit v1.2.3