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(cx-api): throw CloudAssemblyError instead of untyped Errors (#33390)
### 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*
thrownewError(`Unable to find stack with stack name "${stackName}"`);
102
+
thrownewCloudAssemblyError(`Unable to find stack with stack name "${stackName}"`);
102
103
}
103
104
104
105
if(artifacts.length>1){
105
106
// eslint-disable-next-line max-len
106
-
thrownewError(`There are multiple stacks with the stack name "${stackName}" (${artifacts.map(a=>a.id).join(',')}). Use "getStackArtifact(id)" instead`);
107
+
thrownewCloudAssemblyError(`There are multiple stacks with the stack name "${stackName}" (${artifacts.map(a=>a.id).join(',')}). Use "getStackArtifact(id)" instead`);
107
108
}
108
109
109
110
returnartifacts[0]asCloudFormationStackArtifact;
@@ -128,11 +129,11 @@ export class CloudAssembly implements ICloudAssembly {
0 commit comments