Super unintelligible error message when assigning an empty object `identity` property
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 21m
- Merged PRs (30d)
- 79
Description
**Bicep version**
`0.9.1`
**Describe the bug**
Deploying or validating a template with identity set to `{}` yields an error message with no context - I had to use process of elimination to track it down.
**To Reproduce**
* Bicep
```bicep
resource website 'Microsoft.Web/sites@2022-03-01' = {
name: 'foo'
location: resourceGroup().location
properties: {}
identity: {}
}
```
* Bash
```sh
az deployment group validate --template-file main.bicep --resource-group ant-test
```
The error message that is returned:
```json
{"code": "InvalidTemplate", "message": "Deployment template parse failed: 'Required property 'type' not found in JSON. Path ''.'."}
```
Contributor guide
Research direction
Start by reproducing the issue with the Bicep template and the az deployment group validate command shown in the report. Trace how an empty identity object is validated and improve the resulting error so it identifies the relevant resource or property and provides actionable context.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100