{"record":{"id":"c598671c75708cf1","repo":"facebook/react","slug":"580","errorCode":"580","errorMessage":"Server Function has too many bound arguments. Received %s but the limit is %s.","messagePattern":"Server Function has too many bound arguments\\. Received (.+?) but the limit is (.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/react-server/src/ReactFlightActionServer.js","lineNumber":34,"sourceCode":"\nimport {\n  resolveServerReference,\n  preloadModule,\n  requireModule,\n} from 'react-client/src/ReactFlightClientConfig';\n\nimport {\n  createResponse,\n  close,\n  getRoot,\n  MAX_BOUND_ARGS,\n} from './ReactFlightReplyServer';\n\ntype ServerReferenceId = any;\n\nfunction bindArgs(fn: any, args: any) {\n  if (args.length > MAX_BOUND_ARGS) {\n    throw new Error(\n      'Server Function has too many bound arguments. Received ' +\n        args.length +\n        ' but the limit is ' +\n        MAX_BOUND_ARGS +\n        '.',\n    );\n  }\n\n  return fn.bind.apply(fn, [null].concat(args));\n}\n\nfunction loadServerReference<T>(\n  bundlerConfig: ServerManifest,\n  metaData: {\n    id: ServerReferenceId,\n    bound: null | Promise<Array<any>>,\n  },\n): Promise<T> {","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-server/src/ReactFlightActionServer.js#L16-L52","documentation":"Server References ('use server' functions) support partial application via .bind, and the wire protocol caps the stored bound arguments at MAX_BOUND_ARGS = 1000 (defined in ReactFlightReplyServer). bindArgs in ReactFlightActionServer throws error code 580 when the server reconstructs a bound server reference with more than 1000 stored arguments; the client-side serializer enforces the same cap.","triggerScenarios":"Client code calling serverAction.bind(null, ...hugeArray), or accumulating arguments across repeated .bind calls (over 1000 total), then invoking the bound action (form action or transition) so the server rejects the decoded reference.","commonSituations":"Passing large row datasets to a server action via bind instead of a single payload object; programmatic bind loops; spreading request data into .bind.","solutions":["Pass one object or array argument containing the data instead of binding many positional arguments","Split the work across multiple server action calls if the payload is genuinely huge","Remember each .bind call appends to the stored bound args toward the 1000 limit"],"exampleFix":"// before\nconst save = saveRows.bind(null, ...rows); // rows.length > 1000 -> throws\n<form action={save}>...</form>\n\n// after\nconst save = saveRows.bind(null, {rows}); // single payload argument\n<form action={save}>...</form>","handlingStrategy":"validation","validationCode":"const MAX_BOUND_ARGS = 1000; // React's limit (ReactFlightReplyServer)\nfunction bindServerAction(fn, ...args) {\n  if (args.length > MAX_BOUND_ARGS) {\n    throw new RangeError(`Too many bound args: ${args.length} > ${MAX_BOUND_ARGS}`);\n  }\n  return fn.bind(null, ...args);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pass bulk data as one object argument, not many bound positional args","Remember chained binds accumulate toward the 1000-argument cap","Prefer form fields/FormData for large payloads to server actions"],"tags":["server-actions","bind","argument-limit","rsc"],"backgroundTag":"server-action-argument-limit","analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}