{"record":{"id":"442aa8a3a855a3ef","repo":"paperclipai/paperclip","slug":"err-message","errorCode":null,"errorMessage":"err.message","messagePattern":"err\\.message","errorType":"http","errorClass":"ToolGatewayHttpError","httpStatus":null,"severity":"error","filePath":"server/src/services/tool-gateway.ts","lineNumber":8886,"sourceCode":"          },\n        );\n      }\n\n      const requestedParameters = await governedToolArguments(\n        session,\n        tool,\n        input.parameters ?? {},\n      );\n      const argumentValidation = validateToolContent({\n        value: requestedParameters,\n        direction: \"arguments\",\n        sensitiveMode: \"redact\",\n        promptInjectionMode: \"ignore\",\n      });\n      const decisionInput = policyInputForAgentTool({\n        companyId: input.companyId,\n        agentId: input.agentId,\n        actorType: \"user\",\n        actorId: input.userId,\n        tool,\n        parameters: requestedParameters,\n        idempotencyKey: `test-call:${randomUUID()}`,\n        consumeRateLimit: true,\n      });\n      const accessDecision = await policyService.decide(decisionInput);\n      const recorded = await policyService.recordInvocation(\n        decisionInput,\n        accessDecision,\n      );\n      await policyService.writeAudit(decisionInput, accessDecision);\n      const invocationId = recorded.invocation.id;\n\n      if (accessDecision.decision === \"require_approval\") {\n        if (!recorded.actionRequest) {\n          throw new ToolGatewayHttpError(\n            500,","sourceCodeStart":8868,"sourceCodeEnd":8904,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/server/src/services/tool-gateway.ts#L8868-L8904","documentation":"Not a literal throw message: stopSlot catches a ToolRuntimeSupervisorError and re-surfaces it as a gateway HTTP error; the referenced field err.message is the supervisor error text (slot not found, wrong runtime kind, capacity, etc.) carried through so callers see the underlying runtime-slot failure reason.","triggerScenarios":"Thrown at server/src/services/tool-gateway.ts:6344 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The runtime supervisor rejected the operation with the wrapped message; follow that message (capacity, backoff, or unsupported runtime) and retry when conditions clear."],"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"}