diff options
author | Valentin Popov <valentineus@gmail.com> | 2017-06-10 23:42:29 +0300 |
---|---|---|
committer | Valentin Popov <valentineus@gmail.com> | 2017-06-10 23:42:29 +0300 |
commit | 5bcfdc853b2ff5a2390da3de30b006f85f5c837c (patch) | |
tree | eefd2e2771eeb75fb9f8c9fd47ded11c03b67379 /docs/index.js.html | |
parent | ea726a55b9b64bc0ef059ada8fa3daf56320b5a8 (diff) | |
download | iii-client-5bcfdc853b2ff5a2390da3de30b006f85f5c837c.tar.xz iii-client-5bcfdc853b2ff5a2390da3de30b006f85f5c837c.zip |
Release of version 1.1.2.
Diffstat (limited to 'docs/index.js.html')
-rw-r--r-- | docs/index.js.html | 12 |
1 files changed, 9 insertions, 3 deletions
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) { <br class="clear"> <footer> - Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Mon Jun 05 2017 16:37:40 GMT+0000 (UTC) using the Minami theme. + Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Sat Jun 10 2017 20:41:57 GMT+0000 (UTC) using the Minami theme. </footer> <script>prettyPrint();</script> |