Azure / Azure/azurestack-powershell
Autorest generated cmdlet throwing "Argument passed in is not serializable" error
- Langage dominant
- PowerShell
- Étoiles
- 16
- Forks
- 37
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
This is for AzureStack specific admin modules
Some of the generated cmdlets throw "Argument passed in is not serializable" error when incorrect parameter value is passed. In the below examples, "TargetSubscriptionId" parameter value is correct for the first one but not for the second one.
```
PS C:\Windows\system32> Get-AzsUserSubscription -TargetSubscriptionId "966bbf24-21ce-43bd-8735-e1a4c0eed411"
DelegatedProviderSubscriptionId DisplayName ExternalReferenceId OfferId
------------------------------- ----------- ------------------- -------
209523fa-09a8-4642-93df-58496efe1ca2 EventRPBVTTenantSubscription /subscriptions/209523fa-09a8-4642-93df-58496efe1ca2/resourceGroups/EventRPBVTTe...
PS C:\Windows\system32> Get-AzsUserSubscription -TargetSubscriptionId "966bbf24-21ce-43bd-8735-e1a4c0eed418"
Get-AzsUserSubscription : Argument passed in is not serializable.
Parameter name: value
At line:1 char:1
+ Get-AzsUserSubscription -TargetSubscriptionId "966bbf24-21ce-43bd-873 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-AzsUserSubscription_Get], ArgumentException
+ FullyQualifiedErrorId : Microsoft.Azure.PowerShell.Cmdlets.SubscriptionsAdmin.Cmdlets.GetAzsUserSubscription_Get
```
details here: https://github.com/Azure/autorest.powershell/issues/755
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Start with the Get-AzsUserSubscription cmdlet and reproduce the two TargetSubscriptionId invocations shown in the issue. Read the referenced autorest.powershell issue for additional context; done should mean that an incorrect parameter value produces a useful, serializable error instead of the reported exception.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- powershell
- Domaine
- cli
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100