MCPcopy
hub / github.com/facebook/react / fatalError

Function fatalError

packages/react-server/src/ReactFlightServer.js:4018–4039  ·  view source on GitHub ↗
(request: Request, error: mixed)

Source from the content-addressed store, hash-verified

4016}
4017
4018function fatalError(request: Request, error: mixed): void {
4019 const onFatalError = request.onFatalError;
4020 onFatalError(error);
4021 if (enableTaint) {
4022 cleanupTaintQueue(request);
4023 }
4024 // This is called outside error handling code such as if an error happens in React internals.
4025 if (request.destination !== null) {
4026 request.status = CLOSED;
4027 closeWithError(request.destination, error);
4028 } else {
4029 request.status = CLOSING;
4030 request.fatalError = error;
4031 }
4032 const abortReason = new Error(
4033 'The render was aborted due to a fatal error.',
4034 {
4035 cause: error,
4036 },
4037 );
4038 request.cacheController.abort(abortReason);
4039}
4040
4041function emitPostponeChunk(
4042 request: Request,

Callers 6

performWorkFunction · 0.70
startFlowingFunction · 0.70
startFlowingDebugFunction · 0.70
finishHaltFunction · 0.70
finishAbortFunction · 0.70
abortFunction · 0.70

Calls 3

closeWithErrorFunction · 0.90
cleanupTaintQueueFunction · 0.85
abortMethod · 0.65

Tested by

no test coverage detected