summaryrefslogtreecommitdiff
path: root/ext/bg/js/request.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-09-23 12:42:02 -0700
committerAlex Yatskov <alex@foosoft.net>2017-09-23 12:42:02 -0700
commit327027d820759c62f50454822c11c0b8859c1d04 (patch)
tree3a13a25634b7eaf702634a3d6baeb8806c48ab02 /ext/bg/js/request.js
parent2eb85cb835a4aece7839eba25c0030e9eb186f85 (diff)
parentd13cb09fae53834baaac254d7b55d02a26f4a5c0 (diff)
Merge branch 'dev'
Diffstat (limited to 'ext/bg/js/request.js')
-rw-r--r--ext/bg/js/request.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/bg/js/request.js b/ext/bg/js/request.js
index 94fd135a..e4359863 100644
--- a/ext/bg/js/request.js
+++ b/ext/bg/js/request.js
@@ -22,7 +22,7 @@ function requestJson(url, action, params) {
const xhr = new XMLHttpRequest();
xhr.overrideMimeType('application/json');
xhr.addEventListener('load', () => resolve(xhr.responseText));
- xhr.addEventListener('error', () => reject('failed to execute network request'));
+ xhr.addEventListener('error', () => reject('Failed to connect'));
xhr.open(action, url);
if (params) {
xhr.send(JSON.stringify(params));
@@ -34,7 +34,7 @@ function requestJson(url, action, params) {
return JSON.parse(responseText);
}
catch (e) {
- return Promise.reject('invalid JSON response');
+ return Promise.reject('Invalid response');
}
});
}