bicep icon indicating copy to clipboard operation
bicep copied to clipboard

Better error message for unsupported YAML file syntax

Open levimatheri opened this issue 5 months ago • 0 comments

Is your feature request related to a problem? Please describe. The loadYamlContent() expects single-document YAML content, and does not support document separators. If a multi-document YAML file is provided, the current error message surfaced is Unable to parse literal YAML value. Please ensure that it is well-formed.

Example multi-document YAML (this is technically valid YAML content):

abc: 'def'
---
ghi: 'jkl'

Bicep:

var mydata = loadYamlContent('test.yaml') // Unable to parse literal YAML value. Please ensure that it is well-formed (bicep[BCP340]).

Describe the solution you'd like If possible, it would be nice to surface a more specific error message, e.g. something along the lines of Bicep does not support multi-document YAML content.

levimatheri avatar Sep 20 '24 20:09 levimatheri