Azure / Azure/azurestack-powershell

Get-Azs*Quota throws error when quota doesn't exist

Đang mở
#90 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
PowerShell
Star
16
Fork
37
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

When you run the following command:

Get-AzsStorageQuota -Name "DoesNotExist"

Instead of returning $null, it throws an error. This should is no the expected behavior.

```
============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/d6446c5c-0c5e-4899-9af0-ee6dde60c397/providers/Microsoft.Storage.Admin/locations/local/quotas/ascanstorquota510?api-version=2019-08-
08-preview

Headers:

Body:

BeforeCall:
============================ HTTP RESPONSE ============================

Status Code:
NotFound

Headers:
Pragma : no-cache
x-ms-correlation-request-id : bc200d00-b9bc-4d5a-b364-2bfeaeabd70a
x-ms-ratelimit-remaining-subscription-reads: 14955
x-ms-request-id : bc200d00-b9bc-4d5a-b364-2bfeaeabd70a
x-ms-routing-request-id : LOCAL:20210517T230009Z:bc200d00-b9bc-4d5a-b364-2bfeaeabd70a
Strict-Transport-Security : max-age=31536000; includeSubDomains
X-Content-Type-Options : nosniff
Cache-Control : no-cache
Date : Mon, 17 May 2021 23:00:09 GMT
Server : Microsoft-HTTPAPI/2.0
WWW-Authenticate : oYG3MIG0oAMKAQChCwYJKoZIgvcSAQICooGfBIGcYIGZBgkqhkiG9xIBAgICAG+BiTCBhqADAgEFoQMCAQ+iejB4oAMCARKicQRvIU8qOXigYqrxMa3MM5fwqeo6Nmx+FR3CZ6yx9SG7IjE
zAPIR+UipPmlpIg+N1lmR/HJ1n7ErdjhHw9NnA7kJabX2HmNJTOFrZM7utsrmSYQMc576wrYHH3cdV86pmGKq2x82GldbR0yLabKp4j9J

Body:
{
"code": "QuotaNotFound",
"message": "The specified quota was not found.",
"target": "ascanstorquota510"
}

ResponseCreated:
Microsoft.Azure.PowerShell.Cmdlets.StorageAdmin.Runtime.EventData
Microsoft.Azure.PowerShell.Cmdlets.StorageAdmin.Runtime.EventData
Microsoft.Azure.PowerShell.Cmdlets.StorageAdmin.Runtime.EventData
BeforeResponseDispatch:
Get-AzsStorageQuota_Get : The specified quota was not found.
At C:\az.0.10.0\Azs.Storage.Admin\0.9.0\internal\ProxyCmdletDefinitions.ps1:130 char:23
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: ({ SubscriptionI...nstorquota510 }:<>f__AnonymousType0`3) [Get-AzsStorageQuota_Get], Exception
+ FullyQualifiedErrorId : QuotaNotFound,Microsoft.Azure.PowerShell.Cmdlets.StorageAdmin.Cmdlets.GetAzsStorageQuota_Get
[Finally]: Getting exception 'Microsoft.Azure.Commands.Common.Exceptions.AzPSResourceNotFoundCloudException: InternalException' from response
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.