pnp / powershell

PnP PowerShell
https://pnp.github.io/powershell
MIT License
684 stars 351 forks source link

Improve Get-PnPPlannerPlan error message #4500

Closed jackpoz closed 3 weeks ago

jackpoz commented 3 weeks ago

Type

Related Issues?

Improves #4494

What is in this Pull Request ?

Improve Get-PnPPlannerPlan error message when no plan with the specified name is found.

Before the same error was shown when 0 plans were found and when 2+ were found: Screenshot 2024-11-01 202010

Now a different error is shown when 0 plans are found, making it more clear that no plan was found at all. When multiple plans are found, the count is displayed too. The title of the plan passed as parameter is also included in the error message: image

The plan is returned as usual when it's found and it's unique.

gautamdsheth commented 3 weeks ago

Thanks @jackpoz , much appreciated !