paperclipai/paperclip · error · HttpError

upstream_token_missing

upstream_token_missing

Error message

Connection token exchange did not return a token

What it means

Response-shape guard after token exchange: the broker replied successfully but the payload contains no token field. Treats an unexpected empty body as a protocol failure; the malformed upstream response is at fault.

Source

Thrown at server/src/services/tool-access.ts:2154

  if (failure.status === "missing_secret") return 422;
  if (failure.code === "composio_api_key_rejected") return 422;
  if (failure.code.endsWith("_endpoint_rejected")) return 422;
  return 502;
}

function sanitizeHttpFailure(error: unknown): { status: ToolConnectionHealthStatus; message: string; code: string } {
  if (error instanceof ComposioApiError) {
    return {
      status: "error",
      message: error.message,
      code: error.status === 401 || error.status === 403 ? "composio_api_key_rejected" : "composio_request_failed",
    };
  }
  if (error instanceof HttpError) {
    const code = asRecord(error.details).code;
    if (code === "composio_connected_account_inactive") {
      return { status: "degraded", message: error.message, code };
    }
    if (typeof code === "string" && code.startsWith("remote_http_")) {
      return { status: "error", message: error.message, code };
    }
    if (isOAuthEndpointRejection(error)) {
      return { status: "error", message: error.message, code: String(code) };
    }
    if (code === "oauth_challenge") {
      return {
        status: "error",
        message: "This app needs you to sign in.",
        code: "oauth_challenge",
      };
    }
    if (code === "oauth_refresh_missing") {
      return {
        status: "failed",
        message: "OAuth credentials have expired and need to be reconnected.",
        code: "oauth_refresh_missing",

View on GitHub (pinned to 01ad858492)

Solutions

  1. The exchange completed but returned no token. Check the remote service response/logs and re-run the connection flow.
Defensive patterns

Strategy: validation

When it happens

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

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-08-18). Data as JSON: /api/errors/385306e43facb1f9. Report an issue: GitHub.