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-Azs*Quota throws error when quota doesn't exist #90

Open
TheOnlyWei opened this issue May 17, 2021 · 0 comments
Open

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

TheOnlyWei opened this issue May 17, 2021 · 0 comments

Comments

@TheOnlyWei
Copy link
Contributor

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant