From fd0948098453d74554658c1ab382c7eae7e31e9e Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 16 May 2020 17:15:22 +0200 Subject: [PATCH] Tax server error handling improved --- TaskServer/Commons.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/TaskServer/Commons.js b/TaskServer/Commons.js index 4d628a7bd..fcc9ded0b 100644 --- a/TaskServer/Commons.js +++ b/TaskServer/Commons.js @@ -56,6 +56,11 @@ callBackFunction(global.DEFAULT_FAIL_RESPONSE); return } + if (outputDatasetNode.referenceParent.parentNode === undefined) { + logger.write(MODULE_NAME, "[ERROR] start -> Dataset not a child of a Product Definition. Dataset = " + JSON.stringify(outputDatasetNode.referenceParent)); + callBackFunction(global.DEFAULT_FAIL_RESPONSE); + return + } if (outputDatasetNode.referenceParent.parentNode.code.singularVariableName === undefined) { logger.write(MODULE_NAME, "[ERROR] start -> Product Definition without a Single Variable Name defined. Product Definition = " + JSON.stringify(outputDatasetNode.referenceParent.parentNode)); callBackFunction(global.DEFAULT_FAIL_RESPONSE);