You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: Start-AzVirtualNetworkGatewayConnectionPacketCapture should validate JSON for filterdata parameter #30088
There currently does not seem to be validation for the FilterData parameter, which means that when stopping the packet capture we only see an error ErrorCode: NoPacketCaptureResponseDataFound.
It would be helpful to validate the expected JSON string or to use a proper class so that type casting could be used instead.
Example with wrong filter
# Filter should have rather been: $filterdata = @{Filters = @(@{DestinationSubnets = @('10.0.0.0/16')})} | ConvertTo-Json -Compress -Depth 3$filterdata=@{DestinationSubnets=@('10.0.0.0/16')} |ConvertTo-Json-Compress
Start-AzVirtualNetworkGatewayConnectionPacketCapture-ResourceGroupName some-rg -Name some-connection -FilterData $filterdata
The command is accepted despite the wrong filter and the trace is started, but when stopping:
Stop-AzVirtualNetworkGatewayConnectionPacketCapture: Long running operation failed with status 'Failed'. Additional Info:'An internal error occured. The response did not contain any data. Please check storage for the capture.'
StatusCode: 200
ReasonPhrase: OK
Status: Failed
ErrorCode: NoPacketCaptureResponseDataFound
ErrorMessage: An internal error occured. The response did not contain any data. Please check storage for the capture.
Activity
microsoft-github-policy-service commentedon Aug 31, 2026
🔔 Routing this issue to @Azure/act-quality-productivity-squad.