Skip to content

Commit

Permalink
Don't log onRecoverableError if the current commit fail (#28665)
Browse files Browse the repository at this point in the history
We didn't recover after all.

Currently we might log a recoverable error in the recovery pass. E.g.
the SSR server had an error. Then the client component fails to render
which errors again. This ends up double logging.

So if we fail to actually complete a fully successful commit, we ignore
any recoverable errors because we'll get real errors logged.

It's possible that this might cover up some other error that happened at
the same time.

DiffTrain build for [e10a7b5](e10a7b5)
  • Loading branch information
sebmarkbage committed Mar 28, 2024
1 parent 3c7faae commit dec75c4
Show file tree
Hide file tree
Showing 17 changed files with 119 additions and 39 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
323b6e98a76fe6ee721f10d327a9a682334d1a97
e10a7b5cd541882a78ff659147c1a0294413ccb0
12 changes: 10 additions & 2 deletions compiled/facebook-www/ReactART-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if (__DEV__) {
return self;
}

var ReactVersion = "19.0.0-www-classic-1a8f49dd";
var ReactVersion = "19.0.0-www-classic-4c84ebb8";

var LegacyRoot = 0;
var ConcurrentRoot = 1;
Expand Down Expand Up @@ -26489,7 +26489,15 @@ if (__DEV__) {
break;
}

case RootErrored:
case RootErrored: {
// This render errored. Ignore any recoverable errors because we weren't actually
// able to recover. Instead, whatever the final errors were is the ones we log.
// This ensures that we only log the actual client side error if it's just a plain
// error thrown from a component on the server and the client.
workInProgressRootRecoverableErrors = null;
break;
}

case RootSuspended:
case RootCompleted: {
break;
Expand Down
12 changes: 10 additions & 2 deletions compiled/facebook-www/ReactART-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if (__DEV__) {
return self;
}

var ReactVersion = "19.0.0-www-modern-2f1334bc";
var ReactVersion = "19.0.0-www-modern-c7273448";

var LegacyRoot = 0;
var ConcurrentRoot = 1;
Expand Down Expand Up @@ -26148,7 +26148,15 @@ if (__DEV__) {
break;
}

case RootErrored:
case RootErrored: {
// This render errored. Ignore any recoverable errors because we weren't actually
// able to recover. Instead, whatever the final errors were is the ones we log.
// This ensures that we only log the actual client side error if it's just a plain
// error thrown from a component on the server and the client.
workInProgressRootRecoverableErrors = null;
break;
}

case RootSuspended:
case RootCompleted: {
break;
Expand Down
6 changes: 4 additions & 2 deletions compiled/facebook-www/ReactART-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -9133,6 +9133,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
}
break;
case 2:
workInProgressRootRecoverableErrors = null;
break;
case 3:
case 5:
break;
Expand Down Expand Up @@ -10614,7 +10616,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "19.0.0-www-classic-d94b9177",
version: "19.0.0-www-classic-91b37899",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1325 = {
Expand Down Expand Up @@ -10645,7 +10647,7 @@ var internals$jscomp$inline_1325 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-classic-d94b9177"
reconcilerVersion: "19.0.0-www-classic-91b37899"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1326 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
6 changes: 4 additions & 2 deletions compiled/facebook-www/ReactART-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -8832,6 +8832,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
}
break;
case 2:
workInProgressRootRecoverableErrors = null;
break;
case 3:
case 5:
break;
Expand Down Expand Up @@ -10269,7 +10271,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "19.0.0-www-modern-e692ec0d",
version: "19.0.0-www-modern-8e226e00",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1305 = {
Expand Down Expand Up @@ -10300,7 +10302,7 @@ var internals$jscomp$inline_1305 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-modern-e692ec0d"
reconcilerVersion: "19.0.0-www-modern-8e226e00"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1306 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
12 changes: 10 additions & 2 deletions compiled/facebook-www/ReactDOM-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -32137,7 +32137,15 @@ if (__DEV__) {
break;
}

case RootErrored:
case RootErrored: {
// This render errored. Ignore any recoverable errors because we weren't actually
// able to recover. Instead, whatever the final errors were is the ones we log.
// This ensures that we only log the actual client side error if it's just a plain
// error thrown from a component on the server and the client.
workInProgressRootRecoverableErrors = null;
break;
}

case RootSuspended:
case RootCompleted: {
break;
Expand Down Expand Up @@ -36331,7 +36339,7 @@ if (__DEV__) {
return root;
}

var ReactVersion = "19.0.0-www-classic-c7ac3967";
var ReactVersion = "19.0.0-www-classic-4154e20f";

function createPortal$1(
children,
Expand Down
12 changes: 10 additions & 2 deletions compiled/facebook-www/ReactDOM-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -31994,7 +31994,15 @@ if (__DEV__) {
break;
}

case RootErrored:
case RootErrored: {
// This render errored. Ignore any recoverable errors because we weren't actually
// able to recover. Instead, whatever the final errors were is the ones we log.
// This ensures that we only log the actual client side error if it's just a plain
// error thrown from a component on the server and the client.
workInProgressRootRecoverableErrors = null;
break;
}

case RootSuspended:
case RootCompleted: {
break;
Expand Down Expand Up @@ -36179,7 +36187,7 @@ if (__DEV__) {
return root;
}

var ReactVersion = "19.0.0-www-modern-40561912";
var ReactVersion = "19.0.0-www-modern-a6ba24bf";

function createPortal$1(
children,
Expand Down
8 changes: 5 additions & 3 deletions compiled/facebook-www/ReactDOM-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -10928,6 +10928,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
}
break;
case 2:
workInProgressRootRecoverableErrors = null;
break;
case 3:
case 5:
break;
Expand Down Expand Up @@ -17106,7 +17108,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1733 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-classic-85a72ee7",
version: "19.0.0-www-classic-05fdcc15",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2161 = {
Expand Down Expand Up @@ -17136,7 +17138,7 @@ var internals$jscomp$inline_2161 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-classic-85a72ee7"
reconcilerVersion: "19.0.0-www-classic-05fdcc15"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2162 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -17585,4 +17587,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-85a72ee7";
exports.version = "19.0.0-www-classic-05fdcc15";
8 changes: 5 additions & 3 deletions compiled/facebook-www/ReactDOM-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -10746,6 +10746,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
}
break;
case 2:
workInProgressRootRecoverableErrors = null;
break;
case 3:
case 5:
break;
Expand Down Expand Up @@ -16617,7 +16619,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1690 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-modern-41d75570",
version: "19.0.0-www-modern-eefb45dc",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2117 = {
Expand Down Expand Up @@ -16647,7 +16649,7 @@ var internals$jscomp$inline_2117 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-modern-41d75570"
reconcilerVersion: "19.0.0-www-modern-eefb45dc"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2118 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -16949,4 +16951,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-41d75570";
exports.version = "19.0.0-www-modern-eefb45dc";
8 changes: 5 additions & 3 deletions compiled/facebook-www/ReactDOM-profiling.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -11523,6 +11523,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
}
break;
case 2:
workInProgressRootRecoverableErrors = null;
break;
case 3:
case 5:
break;
Expand Down Expand Up @@ -17856,7 +17858,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1819 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-classic-d747211a",
version: "19.0.0-www-classic-d0d2a69b",
rendererPackageName: "react-dom"
};
(function (internals) {
Expand Down Expand Up @@ -17900,7 +17902,7 @@ var devToolsConfig$jscomp$inline_1819 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-classic-d747211a"
reconcilerVersion: "19.0.0-www-classic-d0d2a69b"
});
var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog");
if ("function" !== typeof ReactFiberErrorDialogWWW.showErrorDialog)
Expand Down Expand Up @@ -18336,7 +18338,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-d747211a";
exports.version = "19.0.0-www-classic-d0d2a69b";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
8 changes: 5 additions & 3 deletions compiled/facebook-www/ReactDOM-profiling.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -11335,6 +11335,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
}
break;
case 2:
workInProgressRootRecoverableErrors = null;
break;
case 3:
case 5:
break;
Expand Down Expand Up @@ -17361,7 +17363,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1776 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-modern-62492cff",
version: "19.0.0-www-modern-7d068e58",
rendererPackageName: "react-dom"
};
(function (internals) {
Expand Down Expand Up @@ -17405,7 +17407,7 @@ var devToolsConfig$jscomp$inline_1776 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-modern-62492cff"
reconcilerVersion: "19.0.0-www-modern-7d068e58"
});
var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog");
if ("function" !== typeof ReactFiberErrorDialogWWW.showErrorDialog)
Expand Down Expand Up @@ -17694,7 +17696,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-62492cff";
exports.version = "19.0.0-www-modern-7d068e58";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
12 changes: 10 additions & 2 deletions compiled/facebook-www/ReactDOMTesting-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -32761,7 +32761,15 @@ if (__DEV__) {
break;
}

case RootErrored:
case RootErrored: {
// This render errored. Ignore any recoverable errors because we weren't actually
// able to recover. Instead, whatever the final errors were is the ones we log.
// This ensures that we only log the actual client side error if it's just a plain
// error thrown from a component on the server and the client.
workInProgressRootRecoverableErrors = null;
break;
}

case RootSuspended:
case RootCompleted: {
break;
Expand Down Expand Up @@ -36955,7 +36963,7 @@ if (__DEV__) {
return root;
}

var ReactVersion = "19.0.0-www-classic-7d6a5e18";
var ReactVersion = "19.0.0-www-classic-81c80948";

function createPortal$1(
children,
Expand Down
12 changes: 10 additions & 2 deletions compiled/facebook-www/ReactDOMTesting-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -32618,7 +32618,15 @@ if (__DEV__) {
break;
}

case RootErrored:
case RootErrored: {
// This render errored. Ignore any recoverable errors because we weren't actually
// able to recover. Instead, whatever the final errors were is the ones we log.
// This ensures that we only log the actual client side error if it's just a plain
// error thrown from a component on the server and the client.
workInProgressRootRecoverableErrors = null;
break;
}

case RootSuspended:
case RootCompleted: {
break;
Expand Down Expand Up @@ -36803,7 +36811,7 @@ if (__DEV__) {
return root;
}

var ReactVersion = "19.0.0-www-modern-0276b2d8";
var ReactVersion = "19.0.0-www-modern-f967c031";

function createPortal$1(
children,
Expand Down
8 changes: 5 additions & 3 deletions compiled/facebook-www/ReactDOMTesting-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -11200,6 +11200,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
}
break;
case 2:
workInProgressRootRecoverableErrors = null;
break;
case 3:
case 5:
break;
Expand Down Expand Up @@ -17435,7 +17437,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1760 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-classic-fc252e68",
version: "19.0.0-www-classic-94cf769c",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2169 = {
Expand Down Expand Up @@ -17465,7 +17467,7 @@ var internals$jscomp$inline_2169 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-classic-fc252e68"
reconcilerVersion: "19.0.0-www-classic-94cf769c"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2170 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -18057,4 +18059,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-fc252e68";
exports.version = "19.0.0-www-classic-94cf769c";
Loading

0 comments on commit dec75c4

Please sign in to comment.