{"record":{"id":"16c785206cdac591","repo":"paperclipai/paperclip","slug":"method-path-failed-with-status-body-er","errorCode":null,"errorMessage":"${method} ${path} failed with ${status}: ${body.error}","messagePattern":"(.+?) (.+?) failed with (.+?): (.+?)","errorType":"exception","errorClass":"PaperclipApiError","httpStatus":null,"severity":"error","filePath":"packages/mcp-server/src/client.ts","lineNumber":103,"sourceCode":"      Authorization: `Bearer ${this.config.apiKey}`,\n      Accept: \"application/json\",\n    };\n    if (options.body !== undefined) {\n      headers[\"Content-Type\"] = \"application/json\";\n    }\n    if ((options.includeRunId ?? isWriteMethod(method)) && this.config.runId) {\n      headers[\"X-Paperclip-Run-Id\"] = this.config.runId;\n    }\n\n    const response = await fetch(url, {\n      method,\n      headers,\n      body: options.body === undefined ? undefined : JSON.stringify(options.body),\n    });\n    const parsedBody = await parseResponseBody(response);\n\n    if (!response.ok) {\n      throw new PaperclipApiError({\n        status: response.status,\n        method: method.toUpperCase(),\n        path,\n        body: parsedBody,\n        message: buildErrorMessage(method.toUpperCase(), path, response.status, parsedBody),\n      });\n    }\n\n    return parsedBody as T;\n  }\n}\n","sourceCodeStart":85,"sourceCodeEnd":115,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/packages/mcp-server/src/client.ts#L85-L115","documentation":"Error \"${method} ${path} failed with ${status}: ${body.error}\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at packages/mcp-server/src/client.ts:103 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the returned error body for the cause, fix the request (auth, ids, payload), and retry.","Verify PAPERCLIP_API_URL and PAPERCLIP_API_KEY are correct for the target company."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}