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

Function error

packages/react-server/src/ReactFlightServer.js:1155–1165  ·  view source on GitHub ↗
(reason: mixed)

Source from the content-addressed store, hash-verified

1153 }
1154 }
1155 function error(reason: mixed) {
1156 if (streamTask.status !== PENDING) {
1157 return;
1158 }
1159 request.cacheController.signal.removeEventListener('abort', abortStream);
1160 erroredTask(request, streamTask, reason);
1161 enqueueFlush(request);
1162
1163 // $FlowFixMe should be able to pass mixed
1164 reader.cancel(reason).then(error, error);
1165 }
1166 function abortStream() {
1167 if (streamTask.status !== PENDING) {
1168 return;

Callers 1

progressFunction · 0.70

Calls 5

emitErrorChunkFunction · 0.85
throwMethod · 0.80
erroredTaskFunction · 0.70
enqueueFlushFunction · 0.70
thenMethod · 0.65

Tested by

no test coverage detected