aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/utils
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-01-10 19:39:37 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-01-10 19:43:50 +0800
commite34b0af25133629ad4c177c4d7d5050bd6ac19b8 (patch)
tree936eae17521984e5ccc28057973461e707322326 /packages/website/ts/utils
parentfa7237fde7acea32c5492f0dcdef4d55b3ade6e1 (diff)
downloaddexon-sol-tools-e34b0af25133629ad4c177c4d7d5050bd6ac19b8.tar
dexon-sol-tools-e34b0af25133629ad4c177c4d7d5050bd6ac19b8.tar.gz
dexon-sol-tools-e34b0af25133629ad4c177c4d7d5050bd6ac19b8.tar.bz2
dexon-sol-tools-e34b0af25133629ad4c177c4d7d5050bd6ac19b8.tar.lz
dexon-sol-tools-e34b0af25133629ad4c177c4d7d5050bd6ac19b8.tar.xz
dexon-sol-tools-e34b0af25133629ad4c177c4d7d5050bd6ac19b8.tar.zst
dexon-sol-tools-e34b0af25133629ad4c177c4d7d5050bd6ac19b8.zip
Fix ts error in portal after enabling more strict checks
Diffstat (limited to 'packages/website/ts/utils')
-rw-r--r--packages/website/ts/utils/doc_utils.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/website/ts/utils/doc_utils.ts b/packages/website/ts/utils/doc_utils.ts
index 0bc670d76..1f5f75ee2 100644
--- a/packages/website/ts/utils/doc_utils.ts
+++ b/packages/website/ts/utils/doc_utils.ts
@@ -20,7 +20,7 @@ export const docUtils = {
// TODO: Show the user an error message when the docs fail to load
const errMsg = await response.text();
utils.consoleLog(`Failed to load JSON file list: ${response.status} ${errMsg}`);
- return;
+ throw new Error(errMsg);
}
const responseXML = await response.text();
const responseJSONString = convert.xml2json(responseXML, {
@@ -43,7 +43,7 @@ export const docUtils = {
// TODO: Show the user an error message when the docs fail to load
const errMsg = await response.text();
utils.consoleLog(`Failed to load Doc JSON: ${response.status} ${errMsg}`);
- return;
+ throw new Error(errMsg);
}
const jsonDocObj = await response.json();
return jsonDocObj;