paperclipai/paperclip · error
-32700
-32700
Error message
Request body too large.
What it means
Error "Request body too large." thrown in paperclipai/paperclip.
Source
Thrown at packages/google-sheets-mcp-server/src/http.ts:44
"content-type": "application/json",
"content-length": Buffer.byteLength(payload),
});
res.end(payload);
}
function presentedToken(req: IncomingMessage): string | null {
const header = req.headers.authorization;
if (header?.startsWith("Bearer ")) return header.slice("Bearer ".length).trim();
return null;
}
async function readJsonBody(req: IncomingMessage): Promise<unknown> {
const chunks: Buffer[] = [];
let size = 0;
for await (const chunk of req) {
const buffer = chunk as Buffer;
size += buffer.length;
if (size > 1_000_000) throw new Error("Request body too large.");
chunks.push(buffer);
}
if (chunks.length === 0) return undefined;
const raw = Buffer.concat(chunks).toString("utf8").trim();
if (!raw) return undefined;
return JSON.parse(raw);
}
async function handleMcp(
req: IncomingMessage,
res: ServerResponse,
config: GoogleSheetsMcpConfig,
client: GoogleSheetsClient,
): Promise<void> {
let parsedBody: unknown;
try {
parsedBody = req.method === "POST" ? await readJsonBody(req) : undefined;
} catch (error) {View on GitHub (pinned to 120ae5428f)
Solutions
- Reduce the request payload below the configured body-size limit, or batch the operation into smaller requests.
When it happens
Trigger: Thrown at packages/google-sheets-mcp-server/src/http.ts:44 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18).
Data as JSON: /api/errors/c03074fbd85e74b6.
Report an issue: GitHub.