Merge pull request #11202 from ioito/automated-cherry-pick-of-#11201-upstream-release-3.7

Automated cherry pick of #11201: fix(region): show azure deploy failed error
This commit is contained in:
Zexi Li
2021-05-25 19:08:50 +08:00
committed by GitHub
+7
View File
@@ -1044,6 +1044,13 @@ func (self *SInstance) GetProjectId() string {
}
func (self *SInstance) GetError() error {
if self.Properties.InstanceView != nil {
for _, status := range self.Properties.InstanceView.Statuses {
if status.Code == "ProvisioningState/failed/AllocationFailed" {
return errors.Errorf("%s %s", status.Code, status.Message)
}
}
}
return nil
}