Azure / Azure/azure-powershell

Incorrect error reported by New-AzureRmAutomationWebHook

Open
#2,076 6 comments 0 reactions 4 assignees Claimed by @GaneshMSAzure View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.