diff --git a/packages/react-server/src/ReactFizzServer.js b/packages/react-server/src/ReactFizzServer.js index 97aa52e8538b..4cb163d8fe38 100644 --- a/packages/react-server/src/ReactFizzServer.js +++ b/packages/react-server/src/ReactFizzServer.js @@ -1492,16 +1492,9 @@ function abortTask(task: Task): void { if (!boundary.forceClientRender) { boundary.forceClientRender = true; - if (__DEV__) { - // In DEV error messages are sent to the client and since this is not being handled - // by onError there is no error hash to send. - boundary.errorMessage = - 'This Suspense boundary was aborted by the server'; - } else { - // In Prod only error hashes are sent to the client. Even though this is not a hash - // it will get bubbled up to the user the way we expect it to which is why it goes here - boundary.errorHash = 'This Suspense boundary was aborted by the server'; - } + // Technically not a hash since there is no error to pass to onError. However it will be handled + // the way we want in both dev and prod modes on the client if we report it here as a hash + boundary.errorHash = 'This Suspense boundary was aborted by the server'; if (boundary.parentFlushed) { request.clientRenderedBoundaries.push(boundary); }