You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(batch): throw ValidationError instead of untyped Errors (#33389)
### Issue
Relates to #32569
### Description of changes
`ValidationErrors` everywhere
### Describe any new or updated permissions being added
n/a
### Description of how you validated changes
Existing tests. Exemptions granted as this is a refactor of existing code.
### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
// see https://kubernetes.io/docs/concepts/windows/intro/
1062
-
thrownewError('Readonly root filesystem is not possible on Windows; write access is required for registry & system processes to run inside the container');
1062
+
thrownewValidationError('Readonly root filesystem is not possible on Windows; write access is required for registry & system processes to run inside the container',this);
1063
1063
}
1064
1064
1065
1065
// validates ephemeralStorageSize is within limits
thrownewError(`Managed ComputeEnvironment '${id}' specifies 'AllocationStrategy.SPOT_PRICE_CAPACITY_OPTIMIZED' without using spot instances`);
1187
+
thrownewValidationError(`Managed ComputeEnvironment '${scope.node.id}' specifies 'AllocationStrategy.SPOT_PRICE_CAPACITY_OPTIMIZED' without using spot instances`,scope);
thrownewError(`Managed ComputeEnvironment '${id}' specifies 'AllocationStrategy.SPOT_CAPACITY_OPTIMIZED' without using spot instances`);
1189
+
thrownewValidationError(`Managed ComputeEnvironment '${scope.node.id}' specifies 'AllocationStrategy.SPOT_CAPACITY_OPTIMIZED' without using spot instances`,scope);
1190
1190
}
1191
1191
1192
1192
returnresult;
@@ -1200,34 +1200,34 @@ function validateInstances(types?: ec2.InstanceType[], classes?: ec2.InstanceCla
0 commit comments