paperclipai/paperclip · error · ToolGatewayHttpError

err.message

Error message

err.message

What it means

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.

Solutions

  1. The runtime supervisor rejected the operation with the wrapped message; follow that message (capacity, backoff, or unsupported runtime) and retry when conditions clear.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at server/src/services/tool-gateway.ts:6344 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@3f1d897a7c (2026-08-18). Data as JSON: /api/errors/442aa8a3a855a3ef. Report an issue: GitHub.

Appendix: source

Thrown at server/src/services/tool-gateway.ts:8886

          },
        );
      }

      const requestedParameters = await governedToolArguments(
        session,
        tool,
        input.parameters ?? {},
      );
      const argumentValidation = validateToolContent({
        value: requestedParameters,
        direction: "arguments",
        sensitiveMode: "redact",
        promptInjectionMode: "ignore",
      });
      const decisionInput = policyInputForAgentTool({
        companyId: input.companyId,
        agentId: input.agentId,
        actorType: "user",
        actorId: input.userId,
        tool,
        parameters: requestedParameters,
        idempotencyKey: `test-call:${randomUUID()}`,
        consumeRateLimit: true,
      });
      const accessDecision = await policyService.decide(decisionInput);
      const recorded = await policyService.recordInvocation(
        decisionInput,
        accessDecision,
      );
      await policyService.writeAudit(decisionInput, accessDecision);
      const invocationId = recorded.invocation.id;

      if (accessDecision.decision === "require_approval") {
        if (!recorded.actionRequest) {
          throw new ToolGatewayHttpError(
            500,

View on GitHub (pinned to 3f1d897a7c)