diff --git a/Tasks/AzureResourceManagerTemplateDeploymentV3/Strings/resources.resjson/en-US/resources.resjson b/Tasks/AzureResourceManagerTemplateDeploymentV3/Strings/resources.resjson/en-US/resources.resjson index 655eb258615f..e51b2c232873 100644 --- a/Tasks/AzureResourceManagerTemplateDeploymentV3/Strings/resources.resjson/en-US/resources.resjson +++ b/Tasks/AzureResourceManagerTemplateDeploymentV3/Strings/resources.resjson/en-US/resources.resjson @@ -70,7 +70,7 @@ "loc.messages.EncodingNotSupported": "Encoding of the file '%s' is '%s' which is not supported. Supported file encodings are ['utf-8', 'utf-16le']", "loc.messages.CouldNotDetectEncoding": "Could not detect encoding of file '%s'", "loc.messages.DetectedFileEncoding": "The detected encoding for file '%s' is '%s'", - "loc.messages.ErrorWhileParsingParameter": "There was an error while overriding '%s' parameter because of '%s', make sure it follows JavaScript Object Notation (JSON)", + "loc.messages.ErrorWhileParsingParameter": "The provided metadata file '%s' is missing metadata of parameter '%s'", "loc.messages.TemplateFilePatternMatchingMoreThanOneFile": "Found multiple files matching template file pattern: %s", "loc.messages.TemplateParameterFilePatternMatchingMoreThanOneFile": "Found multiple files matching template parameters file pattern: %s", "loc.messages.TemplateFilePatternMatchingNoFile": "Could not find any file matching the template file pattern", diff --git a/Tasks/AzureResourceManagerTemplateDeploymentV3/operations/Utils.ts b/Tasks/AzureResourceManagerTemplateDeploymentV3/operations/Utils.ts index 4296265b5a82..2fedf987b90a 100644 --- a/Tasks/AzureResourceManagerTemplateDeploymentV3/operations/Utils.ts +++ b/Tasks/AzureResourceManagerTemplateDeploymentV3/operations/Utils.ts @@ -370,8 +370,8 @@ class Utils { try { overrideParameter.value = this.castToType(overrideParameter.value, template.parameters[overrideParameter.name].type); - } catch (error) { - console.log(tl.loc("ErrorWhileParsingParameter", overrideParameter.name, error.toString())); + } catch (error) { + tl.error(tl.loc("ErrorWhileParsingParameter", taskParameters.csmFile, overrideParameter.name)); } parameters[overrideParameter.name] = { value: overrideParameter.value diff --git a/Tasks/AzureResourceManagerTemplateDeploymentV3/task.json b/Tasks/AzureResourceManagerTemplateDeploymentV3/task.json index 1a23c923f541..18f157490976 100644 --- a/Tasks/AzureResourceManagerTemplateDeploymentV3/task.json +++ b/Tasks/AzureResourceManagerTemplateDeploymentV3/task.json @@ -310,7 +310,7 @@ "EncodingNotSupported": "Encoding of the file '%s' is '%s' which is not supported. Supported file encodings are ['utf-8', 'utf-16le']", "CouldNotDetectEncoding": "Could not detect encoding of file '%s'", "DetectedFileEncoding": "The detected encoding for file '%s' is '%s'", - "ErrorWhileParsingParameter": "There was an error while overriding '%s' parameter because of '%s', make sure it follows JavaScript Object Notation (JSON)", + "ErrorWhileParsingParameter": "The provided metadata file '%s' is missing metadata of parameter '%s'", "TemplateFilePatternMatchingMoreThanOneFile": "Found multiple files matching template file pattern: %s", "TemplateParameterFilePatternMatchingMoreThanOneFile": "Found multiple files matching template parameters file pattern: %s", "TemplateFilePatternMatchingNoFile": "Could not find any file matching the template file pattern",