diff --git a/index.js b/index.js index ba72d33..c411b6d 100644 --- a/index.js +++ b/index.js @@ -35,6 +35,7 @@ code: 'FolderExistError', _errMsg: harvestPath + ' harvest folder already exist' }; + err.nonBlocking = true; docObject.error = err; return cb(err); } @@ -88,6 +89,7 @@ code: 'NoResultFound', _errMsg: 'no result found to harvest' }; + _err.nonBlocking = true; docObject.error = _err; return cb(_err); } @@ -133,6 +135,7 @@ code: 'FetchError', _errMsg: err.message }; + _err.nonBlocking = true; docObject.error = _err; return cb(_err); } diff --git a/lib/utils.js b/lib/utils.js index a602d5e..252a8ac 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -74,7 +74,7 @@ }; utils.getHarvestPath = function (path) { - return (process.env.CORPUSES_ROOT ? process.env.CORPUSES_ROOT + '/' + path : path); + return (process.env.CORPUSES_ROOT ? process.env.CORPUSES_ROOT + '/hal/' + path : 'hal/' + path); }; utils.getProxyAgent = function () {