{"record":{"id":"b1ed05aafb309f30","repo":"different-ai/openwork","slug":"mcp-oauth-invalid-target","errorCode":"MCP_OAUTH_INVALID_TARGET","errorMessage":"Correct the configured MCP resource or token audience and restart authorization.","messagePattern":"Correct the configured MCP resource or token audience and restart authorization\\.","errorType":"error_code","errorClass":"InvalidTargetError","httpStatus":null,"severity":"error","filePath":"ee/apps/den-api/src/capability-sources/external-mcp-diagnostics.ts","lineNumber":1288,"sourceCode":"      actionOwner: \"member\",\n      operatorAction: \"Restart authorization; if it repeats, verify redirect URI and PKCE state.\",\n    }\n  }\n  if (name === \"InvalidScopeError\") {\n    return {\n      phase: \"AUTH_USER_OR_WORKLOAD\",\n      category: \"oauth_invalid_scope\",\n      code: \"MCP_OAUTH_INVALID_SCOPE\",\n      retryable: false,\n      actionOwner: \"organization_admin\",\n      operatorAction: \"Correct the configured provider scopes and restart authorization.\",\n    }\n  }\n  if (name === \"InvalidTargetError\") {\n    return {\n      phase: \"AUTH_RESOURCE_VALIDATION\",\n      category: \"oauth_invalid_target\",\n      code: \"MCP_OAUTH_INVALID_TARGET\",\n      retryable: false,\n      actionOwner: \"organization_admin\",\n      operatorAction: \"Correct the configured MCP resource or token audience and restart authorization.\",\n    }\n  }\n  if (name === \"InsufficientScopeError\") {\n    return {\n      phase: \"AUTH_RESOURCE_VALIDATION\",\n      category: \"oauth_insufficient_scope\",\n      code: \"MCP_OAUTH_INSUFFICIENT_SCOPE\",\n      retryable: false,\n      actionOwner: \"organization_admin\",\n      operatorAction: \"Grant the MCP resource scopes required by the provider and restart authorization.\",\n    }\n  }\n  if (name === \"InvalidTokenError\") {\n    return {\n      phase: \"AUTH_RESOURCE_VALIDATION\",","sourceCodeStart":1270,"sourceCodeEnd":1306,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/ee/apps/den-api/src/capability-sources/external-mcp-diagnostics.ts#L1270-L1306","documentation":"Error \"Correct the configured MCP resource or token audience and restart authorization.\" thrown in different-ai/openwork.","triggerScenarios":"Thrown at ee/apps/den-api/src/capability-sources/external-mcp-diagnostics.ts:1288 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2b7df46e8ae1517d64c896c7793d2d52ec845669","analyzedAt":"2026-09-01T07:59:23.713Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}