Skip to content

Commit

Permalink
Correct message annotation on early js errors
Browse files Browse the repository at this point in the history
Summary:
## Context
When is the runtime ready?
- After the main bundle finishes executing **without** raising a fatal javascript error

## Changes
Let's decorate all errors reported while the runtime is not ready as "[runtime not ready]".


Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D66316907
  • Loading branch information
RSNara authored and facebook-github-bot committed Nov 21, 2024
1 parent 12550f0 commit da29b6d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@ void JsErrorHandler::handleErrorWithCppPipeline(
auto id = nextExceptionId();

ParsedError parsedError = {
.message = _isRuntimeReady ? message : ("EarlyJsError: " + message),
.message =
_isRuntimeReady ? message : ("[runtime not ready]: " + message),
.originalMessage = originalMessage,
.name = name,
.componentStack = componentStack,
Expand Down

0 comments on commit da29b6d

Please sign in to comment.