Azure / Azure/azure-powershell
Incorrect error reported by New-AzureRmAutomationWebHook
Open
act-codegen-extensibility-squad
Automation
Service Attention
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 51
Description
If I attempt to create a webhook for a runbook and I specify an invalid runbook name
``` ps1
New-AzureRmAutomationWebHook -ResourceGroupName 'valid-group' -AutomationAccountName 'valid-account' -Name 'webhook1' -RunbookName 'invalid-runbook' -IsEnabled $true -ExpiryTime ((Get-Date).AddYears(1)) -Force
```
I get the following error:
```
New-AzureRmAutomationWebHook : The Automation account was not found.
```
The automation account does exist, but the runbook does not, so the error is misleading.
Contributor guide
Assessment
This issue has not been assessed yet.