fix: log uncaught explore module errors with console.error#19489
Open
wlswo wants to merge 1 commit into
Open
Conversation
`ErrorBoundary.componentDidCatch` in the explore view logs the uncaught
render error through `console.log`:
componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {
console.log('Module content error:', error, errorInfo);
}
`componentDidCatch` is React's canonical error-reporting hook — by the
time it runs, an exception has already propagated up the render tree
and the subtree has been swapped out for the fallback UI. Logging it at
`log` severity hides the failure from the browser DevTools "Errors"
filter and from any tooling (test harnesses, CI log scrapers, error
reporters) that watches `console.error`.
Switch to `console.error` so uncaught errors in explore modules are
surfaced at the appropriate severity. No other behavior change.
Member
FrankChen021
left a comment
There was a problem hiding this comment.
I have reviewed the code for correctness, edge cases, concurrency, and integration risks; no issues found.
Reviewed 1 of 1 changed files.
This is an automated review by Codex GPT-5.5
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.
Description
ErrorBoundary.componentDidCatchin the explore view logs the uncaught render error throughconsole.log:componentDidCatchis React's canonical error-reporting hook — by thetime it runs, an exception has already propagated up the render tree
and the subtree has been swapped out for the
error-boundaryfallbackUI. Logging at
logseverity:console.error(test harnessesthat fail on console errors, log scrapers, error-reporting SDKs)
Switching to
console.errormatches the severity at which othersibling code in the same area logs caught-and-rethrown failures
(e.g.
helpers/execution/sql-task-execution.ts'sconsole.erroronthe reports-endpoint retry path).
No other behavior change — the fallback UI rendering, state handling,
and React's own in-dev
reportErrorpath are untouched.Release note
Uncaught render errors in explore-view modules are now logged at
console.errorseverity from the error boundary, matching the browserDevTools "Errors" filter and any tooling that watches for
console.error.Key changed/added classes in this PR
web-console/src/views/explore-view/components/error-boundary/error-boundary.tsxThis PR has:
componentDidCatchis React's documented error-reporting hook; the catch handler runs only when the subtree has already thrown.)