#2756·msw

在 Linux 上,两个同时监听的 `setupServer()` 实例会对每个请求的处理程序进行两次评估 - 在处理程序查找期间出现 "TypeError: Body is unusable" 错误

作者: Joseamica创建于 2026年6月11日更新于 2026年7月28日

Current behavior Every intercepted request is evaluated **twice** against the request handlers: `executeHandlers` runs 2× with the **same `requestId`** and the **same `Request` instance**. On the second pass the body is already consumed, so the resolver's `await request.json()` throws, and msw prints (once per request with a body):