different-ai/openwork · error · InvalidTargetError

MCP_OAUTH_INVALID_TARGET

MCP_OAUTH_INVALID_TARGET

Error message

Correct the configured MCP resource or token audience and restart authorization.

What it means

Error "Correct the configured MCP resource or token audience and restart authorization." thrown in different-ai/openwork.

Source

Thrown at ee/apps/den-api/src/capability-sources/external-mcp-diagnostics.ts:1288

      actionOwner: "member",
      operatorAction: "Restart authorization; if it repeats, verify redirect URI and PKCE state.",
    }
  }
  if (name === "InvalidScopeError") {
    return {
      phase: "AUTH_USER_OR_WORKLOAD",
      category: "oauth_invalid_scope",
      code: "MCP_OAUTH_INVALID_SCOPE",
      retryable: false,
      actionOwner: "organization_admin",
      operatorAction: "Correct the configured provider scopes and restart authorization.",
    }
  }
  if (name === "InvalidTargetError") {
    return {
      phase: "AUTH_RESOURCE_VALIDATION",
      category: "oauth_invalid_target",
      code: "MCP_OAUTH_INVALID_TARGET",
      retryable: false,
      actionOwner: "organization_admin",
      operatorAction: "Correct the configured MCP resource or token audience and restart authorization.",
    }
  }
  if (name === "InsufficientScopeError") {
    return {
      phase: "AUTH_RESOURCE_VALIDATION",
      category: "oauth_insufficient_scope",
      code: "MCP_OAUTH_INSUFFICIENT_SCOPE",
      retryable: false,
      actionOwner: "organization_admin",
      operatorAction: "Grant the MCP resource scopes required by the provider and restart authorization.",
    }
  }
  if (name === "InvalidTokenError") {
    return {
      phase: "AUTH_RESOURCE_VALIDATION",

View on GitHub (pinned to 2b7df46e8a)

When it happens

Trigger: Thrown at ee/apps/den-api/src/capability-sources/external-mcp-diagnostics.ts:1288 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01). Data as JSON: /api/errors/b1ed05aafb309f30. Report an issue: GitHub.