Skip to content

Commit 932cf04

Browse files
committed
Add prefix to stack traces too
V8 includes the message in the stack and printed errors include just the stack property which is assumed to contain the message.
1 parent 60a2424 commit 932cf04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-server/src/ReactFizzServer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ function encodeErrorForBoundary(
842842
? 'Switched to client rendering because the server rendering aborted due to:\n\n'
843843
: 'Switched to client rendering because the server rendering errored:\n\n';
844844
boundary.errorMessage = prefix + message;
845-
boundary.errorStack = stack;
845+
boundary.errorStack = prefix + stack;
846846
boundary.errorComponentStack = thrownInfo.componentStack;
847847
}
848848
}

0 commit comments

Comments
 (0)