{"record":{"id":"7e549662fb9629c1","repo":"remix-run/react-router","slug":"no-response-body","errorCode":null,"errorMessage":"No response body","messagePattern":"No response body","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/react-router/lib/rsc/browser.tsx","lineNumber":142,"sourceCode":"\n  let landedActionId = 0;\n  return async (id: string, args: unknown[]) => {\n    let actionId = (globalVar.__routerActionID =\n      (globalVar.__routerActionID ??= 0) + 1);\n\n    const temporaryReferences = createTemporaryReferenceSet();\n    const payloadPromise = fetchImplementation(\n      new Request(location.href, {\n        body: await encodeReply(args, { temporaryReferences }),\n        method: \"POST\",\n        headers: {\n          Accept: \"text/x-component\",\n          \"rsc-action-id\": id,\n        },\n      }),\n    ).then((response) => {\n      if (!response.body) {\n        throw new Error(\"No response body\");\n      }\n      return createFromReadableStream(response.body, {\n        temporaryReferences,\n      }) as Promise<RSCPayload>;\n    });\n\n    React.startTransition(() =>\n      Promise.resolve(payloadPromise)\n        .then(async (payload) => {\n          if (payload.type === \"redirect\") {\n            let location = normalizeRedirectLocation(payload.location);\n            validateNavigationTarget(\n              payload.location,\n              location,\n              new URL(window.location.href),\n              \"allow-explicit\",\n            );\n            if (payload.reload || isExternalLocation(location)) {","sourceCodeStart":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/remix-run/react-router/blob/7aea711dd1ae2bc5a076d13ff17291829690fa74/packages/react-router/lib/rsc/browser.tsx#L124-L160","documentation":"When an RSC server action is invoked from the browser, the client POSTs with `rsc-action-id` and expects an RSC payload stream back to `createFromReadableStream`. If the fetch resolves with a `Response` whose `body` is null (204 No Content, HEAD-like responses, some proxy-generated responses), the promise chain throws this error. The action call then rejects into the calling component's error handling.","triggerScenarios":"A middleware or gateway replying 204/empty to the action POST; a service worker or custom `fetch` wrapper returning `new Response()` without a body for POST requests; the server action route being intercepted by an auth layer that responds bodyless; CDNs stripping bodies for certain statuses.","commonSituations":"Deploying behind API gateways that answer POSTs with bodyless 3xx/204; offline-first service workers fabricating responses; custom `unstable_RSCHydratedRouter`/callServer `fetch` implementations that forget to pass through the body.","solutions":["Inspect the action POST in the network tab: if the status is 204/3xx with no body, fix the interceptor (auth proxy, middleware, service worker) to let the RSC response reach the browser.","Ensure any custom `fetch` passed to the RSC browser APIs returns the original `Response` untouched.","Make sure the action's route/module exists server-side so the framework, not a fallback handler, answers the POST.","After a deploy, hard reload to rule out version skew in the action-id routing."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const result = await callServerAction(args);\n} catch (e) {\n  if (e instanceof Error && e.message === \"No response body\") {\n    window.location.reload(); // recover from gateway-mangled action POST\n  } else {\n    throw e;\n  }\n}","preventionTips":["Pass custom fetch implementations through untouched when wiring RSC browser APIs.","Register service workers to skip POST requests and .rsc/action URLs.","Check gateway rules that answer POSTs with bodyless statuses."],"tags":["rsc","server-action","response-body","network"],"backgroundTag":"empty-response-body","analyzedSha":"7aea711dd1ae2bc5a076d13ff17291829690fa74","analyzedAt":"2026-08-18T18:04:14.938Z","contentChangedAt":"2026-08-18T18:04:14.938Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}