{"record":{"id":"405a34a5e2d5db12","repo":"paperclipai/paperclip","slug":"mcp-remote-status","errorCode":"mcp_remote_status","errorMessage":"Remote MCP server returned an HTTP error","messagePattern":"Remote MCP server returned an HTTP error","errorType":"http","errorClass":"ToolGatewayHttpError","httpStatus":502,"severity":"error","filePath":"server/src/services/tool-gateway.ts","lineNumber":4138,"sourceCode":"        \"missing_secret\",\n        \"A configured credential secret could not be resolved.\",\n      );\n      if (input.requireResolved) {\n        throw new ToolGatewayHttpError(\n          422,\n          \"A configured credential secret could not be resolved.\",\n          \"mcp_remote_missing_secret\",\n          { connectionId: connection.id, credential: input.configPath },\n        );\n      }\n      return {\n        refHash: input.refHash,\n        versionSelector: String(versionSelector),\n        resolvedVersion: -1,\n      };\n    }\n  }\n\n  async function connectedCredentialVersionSnapshots(\n    connection: typeof toolConnections.$inferSelect,\n    grant: typeof connectionGrants.$inferSelect,\n    options: { requireResolved: boolean },\n  ): Promise<{\n    headerCredentialVersions: ConnectedCredentialVersionSnapshot[];\n    credentialSecretVersions: ConnectedCredentialVersionSnapshot[];\n  }> {\n    const headerCredentialVersions: ConnectedCredentialVersionSnapshot[] = [];\n    const credentialSecretVersions: ConnectedCredentialVersionSnapshot[] = [];\n\n    for (const ref of connection.credentialRefs ?? []) {\n      if (ref.placement !== \"header\" && ref.placement !== \"url\") continue;\n      const typedRef = ref as McpConnectionCredentialRef;\n      const grantRef = grantRefForCredential(grant, typedRef);\n      if (!grantRef) continue;\n      const configPath =\n        typedRef.placement === \"url\"","sourceCodeStart":4120,"sourceCodeEnd":4156,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/server/src/services/tool-gateway.ts#L4120-L4156","documentation":"Remote MCP forwarding: the upstream server answered tools/call with a non-2xx HTTP status. The connection health is marked error and a 502 mcp_remote_status wraps the upstream status, request id, and execution details — the failure originates in the remote server, not the gateway or the agent's request shape.","triggerScenarios":"Thrown at server/src/services/tool-gateway.ts:3106 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The remote MCP server returned an HTTP error. Check the server URL, credentials, and remote server health, then retry."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3f1d897a7c018d76563a21c6e39c3c9b03933622","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}