[Flight Reply] Update error message (#27549)
This is in the reverse direction.
Sebastian Markbåge committed
Oct 19, 2023 at 13:40 UTC
2eeb9f9226af60149792f5c33e29a9c0001bba61
1 file changed
+3
-3
packages/react-client/src/ReactFlightReplyClient.js
+3
-3
@@ -304,14 +304,14 @@ export function processReply(
304
);
305
} else if (objectName(value) !== 'Object') {
306
console.error(
307
- 'Only plain objects can be passed to Client Components from Server Components. ' +
307
+ 'Only plain objects can be passed to Server Functions from the Client. ' +
308
'%s objects are not supported.%s',
309
objectName(value),
310
describeObjectForErrorMessage(parent, key),
311
);
312
} else if (!isSimpleObject(value)) {
313
console.error(
314
- 'Only plain objects can be passed to Client Components from Server Components. ' +
314
+ 'Only plain objects can be passed to Server Functions from the Client. ' +
315
'Classes or other objects with methods are not supported.%s',
316
describeObjectForErrorMessage(parent, key),
317
);
@@ -319,7 +319,7 @@ export function processReply(
319
const symbols = Object.getOwnPropertySymbols(value);
320
if (symbols.length > 0) {
321
console.error(
322
- 'Only plain objects can be passed to Client Components from Server Components. ' +
322
+ 'Only plain objects can be passed to Server Functions from the Client. ' +
323
'Objects with symbol properties like %s are not supported.%s',
324
symbols[0].description,
325
describeObjectForErrorMessage(parent, key),