diff --git a/lib/BaseDownloadController.js b/lib/BaseDownloadController.js index a1ebf0e..21058e5 100644 --- a/lib/BaseDownloadController.js +++ b/lib/BaseDownloadController.js @@ -41,10 +41,6 @@ module.exports = class BaseDownloadController extends CompositeController { // when failure to download optional resource occurs, should continue to download other requests, but shouldnt reconcile children let optionalResourceFailure = 0; - // when failure to download mandatory resource occurs, should attempt to download other requests, but shouldn't patch self or reconcile children - // for cases where one resource requires another in order to be applied - let mandatoryResourceFailure = 0; - let errMsgs = ''; let lastModifiedArray = objectPath.get(this.data, ['object', 'status', 'last-modified'], []); let newLastModifiedArray = []; @@ -136,20 +132,13 @@ module.exports = class BaseDownloadController extends CompositeController { this.log.warn(msg); this.updateRazeeLogs('warn', { controller: 'BaseDownload', warn: `Error applying file to kubernetes, see logs for details. StatusCode: ${e.statusCode}`, url: url }); } else { - // attempt to apply all files rather than aborting on encountering the first error - ++mandatoryResourceFailure; - errMsgs += '\n'+msg; + return Promise.reject(msg); } } } this.log.info(`requests processed: ${requests.length}`); - if( mandatoryResourceFailure > 0 ) { - this.log.error(`${mandatoryResourceFailure} mandatory resource(s) failed to process: ${errMsgs}`); - return Promise.reject(`${mandatoryResourceFailure} errors occurred: ${errMsgs}`); - } - // update the last-modified array let res = await this.patchSelf({ status: {