diff --git a/src/helpers/csv-helper-util.js b/src/helpers/csv-helper-util.js index 20ab9ec4a34ff2d5bd0793be18e816e7db7e322f..6cb7a3db70b5e1c28f4939801b0ba4b356dfc64d 100644 --- a/src/helpers/csv-helper-util.js +++ b/src/helpers/csv-helper-util.js @@ -214,15 +214,15 @@ class CSVFileValidator { } }); - if (hasError) { - return; - } - // Custom row validation if (_.isFunction(this.config.validateRow)) { this.config.validateRow(rowData, rowIndex + 1, this.flattenHierarchyObj); } + if (hasError) { + return; + } + // Push the rowData this.response.data.push(rowData); }); diff --git a/src/service/kafkaQumlConsumerService.js b/src/service/kafkaQumlConsumerService.js index 32a86be8203a866834c65463ca3c6ab4c5a3b01a..60092631b6b0265d52dbc6ddb9c21fedb9fd5a7e 100644 --- a/src/service/kafkaQumlConsumerService.js +++ b/src/service/kafkaQumlConsumerService.js @@ -200,7 +200,7 @@ const validateFileType = (data, callback) => { if(allowedMimeType.includes(data.mimeType)) { callback(null, data); } else { - callback(`Images mimetype should be one of: [${allowedMimeType}]'`); + callback('Invalid image format! Image format must be JPG or PNG'); } }