Azure / AzLoadBalancerMigration

This repo contains a PowerShell module to support Azure Load Balancer migration from Basic to Standard SKU
MIT License
10 stars 9 forks source link

🪲 Bug Report - Correct Error Handling in Update-VMSS Function #59

Closed mbrat2005 closed 1 year ago

mbrat2005 commented 1 year ago

Describe the bug

2023-05-01T22:34:10+00 [Error] -             [_UpdateAzVmss] An error occured when attempting to update VMSS network config new Standard             LB backend pool membership. To recover address the following error, and try again specifying the             -FailedMigrationRetryFilePath parameter and Basic Load Balancer backup State file located either in             this directory or the directory specified with -RecoveryBackupPath.  Error message: Cannot convert 'System.Management.Automation.PSDataCollection`1[System.Management.Automation.ErrorRecord]' to the type 'System.Management.Automation.ErrorRecord' required by parameter 'ErrorRecord'. Specified method is not supported. 

    If ($job.Error -or $job.State -eq 'Failed') {
        **Write-Error $job.error**
    }
mbrat2005 commented 1 year ago

60 Improved in theory, but I couldn't generate an error to validate...