mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-16 20:08:09 +00:00
handle OperationNotAllowed errors when creating VMSS (#614)
This commit is contained in:
@ -322,9 +322,10 @@ def create_vmss(
|
||||
resource_group, name, params
|
||||
)
|
||||
except ResourceExistsError as err:
|
||||
if "SkuNotAvailable" in repr(err):
|
||||
err_str = str(err)
|
||||
if "SkuNotAvailable" in err_str or "OperationNotAllowed" in err_str:
|
||||
return Error(
|
||||
code=ErrorCode.VM_CREATE_FAILED, errors=["creating vmss: %s" % err]
|
||||
code=ErrorCode.VM_CREATE_FAILED, errors=[f"creating vmss: {err_str}"]
|
||||
)
|
||||
raise err
|
||||
except (ResourceNotFoundError, CloudError) as err:
|
||||
|
Reference in New Issue
Block a user