Added return instead of console

This commit is contained in:
Keerthi Niranjan 2017-07-31 20:55:19 +05:30 committed by Keerthi Niranjan
parent 2e90b8f67e
commit 15ba93bb57

View File

@ -175,12 +175,11 @@ class Search {
try {
data = JSON.parse(result);
if (data.status === 'OK') {
console.log('Successful')
} else {
console.log("Failed to validate index data folder");
return data;
}
return new Error('Unable validate index folder')
} catch (err) {
throw err;
throw (err)
}
}
}