{"record":{"id":"90fc98a8d74721a8","repo":"paperclipai/paperclip","slug":"gateway-auth-throttled","errorCode":"gateway_auth_throttled","errorMessage":"MCP gateway authentication was throttled","messagePattern":"MCP gateway authentication was throttled","errorType":"http","errorClass":"ToolGatewayHttpError","httpStatus":429,"severity":"error","filePath":"server/src/services/tool-gateway.ts","lineNumber":5063,"sourceCode":"        protocolVersion: \"2024-11-05\",\n        capabilities: {},\n        clientInfo: { name: \"paperclip-tool-gateway\", version: \"0.3.1\" },\n      });\n      child.stdin.write(\n        `${JSON.stringify({ jsonrpc: \"2.0\", method: \"notifications/initialized\", params: {} })}\\n`,\n      );\n      return await request(\n        input.protocolMethod ?? \"tools/call\",\n        input.protocolParams ?? {\n          name: input.entry?.toolName,\n          arguments: input.parameters ?? {},\n        },\n      );\n    } finally {\n      clearTimeout(timer);\n      child.stdin.end();\n      child.kill(\"SIGTERM\");\n      await exitPromise.catch(() => undefined);\n    }\n  }\n\n  async function fullyAssignedMcpConnections(session: ToolGatewaySession) {\n    if (!session.gatewayProfileId) return [];\n    return db\n      .select({ connection: toolConnections })\n      .from(toolProfileEntries)\n      .innerJoin(\n        toolConnections,\n        eq(toolProfileEntries.connectionId, toolConnections.id),\n      )\n      .where(\n        and(\n          eq(toolProfileEntries.companyId, session.companyId),\n          eq(toolProfileEntries.profileId, session.gatewayProfileId),\n          eq(toolProfileEntries.selectorType, \"connection\"),\n          eq(toolProfileEntries.effect, \"include\"),","sourceCodeStart":5045,"sourceCodeEnd":5081,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/server/src/services/tool-gateway.ts#L5045-L5081","documentation":"Repeated named-gateway authentication failures tripped the authFailures limiter: within the sliding window the token/gateway failure counter reached protocolLimits.authFailures.max, so further attempts are refused with a throttle response carrying retryAfterMs. The audit entry records the original failedReasonCode plus limiter details; legitimate clients must wait out the window and then use a valid token.","triggerScenarios":"Thrown at server/src/services/tool-gateway.ts:3571 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Authentication attempts were throttled. Stop retrying briefly, verify the token is correct, and retry after the throttle window."],"exampleFix":null,"handlingStrategy":"retry","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"}