{"record":{"id":"a9593674469a65cb","repo":"paperclipai/paperclip","slug":"message","errorCode":null,"errorMessage":"message","messagePattern":"message","errorType":"http","errorClass":"ToolGatewayHttpError","httpStatus":422,"severity":"error","filePath":"server/src/services/tool-gateway.ts","lineNumber":10783,"sourceCode":"          session: sessionLike,\n          companyId: input.runContext.companyId,\n          agentId: input.runContext.agentId,\n          runId: input.runContext.runId,\n          issueId: context.issueId,\n          action: \"tool_gateway.call_failed\",\n          details: {\n            invocationId,\n            decision: \"deny\",\n            reasonCode,\n            tool: input.tool,\n            ...toolAuditMetadata(tool),\n            argumentsSummary: argumentValidation.summary,\n            durationMs: Date.now() - startedAt,\n            error: message,\n          },\n        });\n        if (err instanceof ToolContentValidationError) {\n          throw new ToolGatewayHttpError(422, message, reasonCode, {\n            findings: err.findings,\n          });\n        }\n        throw err;\n      }\n    },\n\n    async revokeSession(input: {\n      companyId: string;\n      sessionId: string;\n      revokedAt?: Date;\n      actor?: {\n        actorType?: LogActivityInput[\"actorType\"];\n        actorId?: string;\n        agentId?: string | null;\n        runId?: string | null;\n      };\n      agentScope?: { agentId: string; runId?: string | null } | null;","sourceCodeStart":10765,"sourceCodeEnd":10801,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/server/src/services/tool-gateway.ts#L10765-L10801","documentation":"Not a literal throw message: this is the audit details block for tool_gateway.call_failed / call_deferred. The referenced field is the normalized error 'message' variable — the upstream/tool error text captured after a failed or deferred tool call, recorded with invocationId, reasonCode, durationMs, and execution audit metadata for diagnosis.","triggerScenarios":"Thrown at server/src/services/tool-gateway.ts:6017 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The tool call failed with the wrapped error message; address the reported cause (often a validation or provider error) and retry."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3f1d897a7c018d76563a21c6e39c3c9b03933622","analyzedAt":"2026-09-18T08:03:59.046Z","contentChangedAt":"2026-09-18T08:03:59.046Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}