fix: fatal failures hide the underlying error cause - #1939
Merged
Conversation
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
mrgrain
force-pushed
the
mrgrain/fix/more-error-details
branch
from
September 3, 2026 13:46
06eb7b4 to
581a708
Compare
dgandhi62
approved these changes
Sep 3, 2026
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.
When a deployment fails, the CLI now tells you what actually went wrong instead of just which stack it happened in.
Previously a fatal failure was flattened into a single line like
❌ Test-Stack-A failed: ResourceNotReady: <message>. That line was assembled by hand and thrown as a new error, discarding the original one — so anything nested below the first level was invisible. The AWS API error that ultimately caused the failure never made it to your terminal, and--debugdidn't help either because the trace stopped at the first cause.Failures now keep the original error attached as a cause, and the CLI prints the entire chain, one
‣ <name>: <message>line per level. You get the stack that failed, the CDK-level reason, and the underlying service error in one go, without re-running anything. With--debugyou additionally get a stack trace for every level of the chain rather than only the outermost one.Hotswap failures benefit the most from this. Errors coming out of a hotswap deployment are now labelled with the service responsible, so in a deployment touching several resources you can see which one broke instead of guessing. Cloud Control update failures previously surfaced as bare API errors with no hint of their origin; they now name the resource identifier and type that failed to update.
The two test apps switch from
Stack.addDependencytoaddStackDependency— the former is deprecated in currentaws-cdk-lib, and the deprecation output is annoying.Before
After
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license