{"record":{"id":"82ddd87321d2d7b6","repo":"vercel/next.js","slug":"config-options-experimental-proxyclientmaxbodysiz","errorCode":null,"errorMessage":"Config options `experimental.proxyClientMaxBodySize` and `experimental.middlewareClientMaxBodySize` cannot be set at the same time. Please use `experimental.proxyClientMaxBodySize` instead.","messagePattern":"Config options `experimental\\.proxyClientMaxBodySize` and `experimental\\.middlewareClientMaxBodySize` cannot be set at the same time\\. Please use `experimental\\.proxyClientMaxBodySize` instead\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/next/src/server/config.ts","lineNumber":1046,"sourceCode":"    if (typeof bodySizeLimit === 'number') {\n      value = bodySizeLimit\n    } else {\n      value = bytes.parse(bodySizeLimit)\n    }\n\n    if (value === null || isNaN(value) || value < 1) {\n      throw new Error(\n        'Server Actions Size Limit must be a valid number or filesize format larger than 1MB: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit'\n      )\n    }\n  }\n\n  // Throw if both Middleware and Proxy config are set.\n  if (\n    userConfig.experimental?.proxyClientMaxBodySize !== undefined &&\n    userConfig.experimental?.middlewareClientMaxBodySize !== undefined\n  ) {\n    throw new Error(\n      'Config options `experimental.proxyClientMaxBodySize` and `experimental.middlewareClientMaxBodySize` cannot be set at the same time. Please use `experimental.proxyClientMaxBodySize` instead.'\n    )\n  }\n  if (\n    userConfig.experimental?.proxyPrefetch !== undefined &&\n    userConfig.experimental?.middlewarePrefetch !== undefined\n  ) {\n    throw new Error(\n      'Config options `experimental.proxyPrefetch` and `experimental.middlewarePrefetch` cannot be set at the same time. Please use `experimental.proxyPrefetch` instead.'\n    )\n  }\n  if (\n    userConfig.experimental?.externalProxyRewritesResolve !== undefined &&\n    userConfig.experimental?.externalMiddlewareRewritesResolve !== undefined\n  ) {\n    throw new Error(\n      'Config options `experimental.externalProxyRewritesResolve` and `experimental.externalMiddlewareRewritesResolve` cannot be set at the same time. Please use `experimental.externalProxyRewritesResolve` instead.'\n    )","sourceCodeStart":1028,"sourceCodeEnd":1064,"githubUrl":"https://github.com/vercel/next.js/blob/34433fd12ee8074ea3f47af9f36255c7390d0301/packages/next/src/server/config.ts#L1028-L1064","documentation":"Error \"Config options `experimental.proxyClientMaxBodySize` and `experimental.middlewareClientMaxBodySize` cannot be set at the same time. Please use `experimental.proxyClientMaxBodySize` instead.\" thrown in vercel/next.js.","triggerScenarios":"Both proxyClientMaxBodySize and middlewareClientMaxBodySize are set.","commonSituations":"Migrating config that sets both the old middleware and new proxy body-size options.","solutions":["Remove experimental.middlewareClientMaxBodySize and keep only experimental.proxyClientMaxBodySize."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"34433fd12ee8074ea3f47af9f36255c7390d0301","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}