From 0fbe8e4077258d9fe1d074585af9274c2391fba7 Mon Sep 17 00:00:00 2001 From: Matias Date: Sun, 7 Jul 2019 21:02:39 -0300 Subject: [PATCH 1/2] File does not exist fix --- src/FileStorage.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/FileStorage.js b/src/FileStorage.js index 1afbcb8a9..c14f50da7 100644 --- a/src/FileStorage.js +++ b/src/FileStorage.js @@ -49,10 +49,12 @@ function newFileStorage() { return } let response = res.data.data.web_FileContent - if (response) + if (response){ callBackFunction(GLOBAL.DEFAULT_OK_RESPONSE, response) - else - callBackFunction(GLOBAL.CUSTOM_FAIL_RESPONSE) + } else { + let error = { code: 'The specified key does not exist.' } + callBackFunction(error) + } }).catch(error => { if (error.message === 'Request aborted' || error.message === 'Network Error') { let error = { code: 'The specified key does not exist.' } From c95dd3bc63f066fc95e631b2214db4dbbd305ac6 Mon Sep 17 00:00:00 2001 From: Matias Date: Sun, 7 Jul 2019 21:02:39 -0300 Subject: [PATCH 2/2] File does not exist fix --- src/FileStorage.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/FileStorage.js b/src/FileStorage.js index 1afbcb8a9..c14f50da7 100644 --- a/src/FileStorage.js +++ b/src/FileStorage.js @@ -49,10 +49,12 @@ function newFileStorage() { return } let response = res.data.data.web_FileContent - if (response) + if (response){ callBackFunction(GLOBAL.DEFAULT_OK_RESPONSE, response) - else - callBackFunction(GLOBAL.CUSTOM_FAIL_RESPONSE) + } else { + let error = { code: 'The specified key does not exist.' } + callBackFunction(error) + } }).catch(error => { if (error.message === 'Request aborted' || error.message === 'Network Error') { let error = { code: 'The specified key does not exist.' }