Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-AzPrivateEndpointConnection shows friendly message if rp and resource is not supported #17091

Closed
dingmeng-xue opened this issue Feb 14, 2022 · 0 comments · Fixed by #18000
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Network - Private Link

Comments

@dingmeng-xue
Copy link
Member

Description

From #16984

Azure PowerShell provides error message Object reference not set to an instance of an object when rp or resource is not supported. Cmdlet should show better message to end user.

Besides Get-AzPrivateEndpointConnection, other cmdlets relying on configuration list should show better message as well.

Issue script & Debug output

PS /Users/myusername> Get-AzPrivateEndpointConnection -ResourceId /subscriptions/my-subscription/resourceGroups/my-rg/providers/Microsoft.Network/privateLinkServices/MyPrivateLinkService
DEBUG: 10:28:07 AM - GetAzurePrivateEndpointConnection begin processing with ParameterSet 'ByResourceId'.
DEBUG: 10:28:07 AM - using account id 'myalias@microsoft.com'...
Get-AzPrivateEndpointConnection: Object reference not set to an instance of an object.
DEBUG: AzureQoSEvent: Module: Az.Network:4.14.0; CommandName: Get-AzPrivateEndpointConnection; PSVersion: 7.1.5; IsSuccess: False; Duration: 00:00:00.1252211; Exception: Object reference not set to an instance of an object.;
DEBUG: Finish sending metric.
DEBUG: 10:28:07 AM - GetAzurePrivateEndpointConnection end processing.

Environment data

All

Module versions

Az.Network

Error output

No response

@dingmeng-xue dingmeng-xue added bug This issue requires a change to an existing behavior in the product in order to be resolved. needs-triage This is a new issue that needs to be triaged to the appropriate team. Network - Private Link labels Feb 14, 2022
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Network - Private Link
Projects
None yet
2 participants