chore: Log app layout error-boundary catches#4706
Merged
Merged
Conversation
Emit a fixed [AwsUiAppLayoutError] prefix from the app layout error boundary's onError so integration/canary tests can detect real App Layout breakage by matching the prefix instead of maintaining an allowlist of unrelated console noise. The prefix is a string literal, so it survives minification.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4706 +/- ##
=======================================
Coverage 97.57% 97.57%
=======================================
Files 948 948
Lines 30507 30517 +10
Branches 11164 11167 +3
=======================================
+ Hits 29767 29777 +10
- Misses 693 733 +40
+ Partials 47 7 -40 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
georgylobko
reviewed
Jul 9, 2026
| errorMessage: error?.error?.message ?? '', | ||
| appLayoutPart: appLayoutPart ?? '', | ||
| }); | ||
| console.log(`[AwsUiAppLayoutError] appLayoutPart=${appLayoutPart ?? ''}`, error?.error); |
Member
Author
There was a problem hiding this comment.
Because the purpose of error boundaries is, at least in part, to allow errors to be caught and handled gracefully. At this point, we don't know whether this error will be caught by a higher-level and handled in some way there or not, so IMO it's better to be rather cautious and use log instead of error here to prevent creating error messages when the error is actually caught and handled gracefully.
georgylobko
approved these changes
Jul 9, 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.
Summary
App layout error boundaries now emit a fixed
[AwsUiAppLayoutError]prefix to the console on each catch. This lets the integration/canary tests detect real App Layout breakage by matching the prefix, instead of maintaining an allowlist of every other service's console noise. The prefix is a string literal, so it survives minification.Testing
Unit tests assert the marker fires per app layout part on a real boundary catch. quick-build, unit suites, and lint all pass.