feat(toolkit-lib): wrap errors from assembly builder into AssemblyError#200
Merged
aws-cdk-automation merged 1 commit intomainfrom Mar 6, 2025
Merged
Conversation
mrgrain
commented
Mar 6, 2025
Comment on lines
+3
to
+6
| const TOOLKIT_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.ToolkitError'); | ||
| const AUTHENTICATION_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.AuthenticationError'); | ||
| const ASSEMBLY_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.AssemblyError'); | ||
| const CONTEXT_PROVIDER_ERROR_SYMBOL = Symbol.for('@aws-cdk/toolkit-lib.ContextProviderError'); |
Contributor
Author
There was a problem hiding this comment.
Missed these in the rename. They are private symbols, so it's fine.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #200 +/- ##
==========================================
+ Coverage 85.07% 85.12% +0.04%
==========================================
Files 207 207
Lines 35706 35760 +54
Branches 4629 4632 +3
==========================================
+ Hits 30378 30440 +62
+ Misses 5171 5167 -4
+ Partials 157 153 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
6965b21 to
580e8af
Compare
iliapolo
reviewed
Mar 6, 2025
packages/@aws-cdk/tmp-toolkit-helpers/test/api/toolkit-error.test.ts
Outdated
Show resolved
Hide resolved
580e8af to
34dd191
Compare
kaizencc
approved these changes
Mar 6, 2025
Contributor
kaizencc
left a comment
There was a problem hiding this comment.
youve addressed eli's comments and its late for him so im just going to approve
github-merge-queue bot
pushed a commit
that referenced
this pull request
Mar 6, 2025
…or (#200) Fixes errors thrown from a CloudAssembly produced by a builder function are unstructured. Wrapping errors will allow better handling by implementors. Also introduced the `source` property on `ToolkitError`s as per the RFC, to denote the source of an error (user or toolkit). --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes errors thrown from a CloudAssembly produced by a builder function are unstructured. Wrapping errors will allow better handling by implementors.
Also introduced the
sourceproperty onToolkitErrors as per the RFC, to denote the source of an error (user or toolkit).By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license