{"record":{"id":"c00abd228f2e94b4","repo":"different-ai/openwork","slug":"mcp-oauth-client-rejected","errorCode":"MCP_OAUTH_CLIENT_REJECTED","errorMessage":"MCP_OAUTH_CLIENT_REJECTED","messagePattern":"MCP_OAUTH_CLIENT_REJECTED","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ee/apps/den-api/src/capability-sources/external-mcp-diagnostics.ts","lineNumber":1258,"sourceCode":"  }\n  if (numericCode === -32602 && fallbackPhase === \"MCP_TOOL_EXECUTION\") {\n    return {\n      phase: \"MCP_TOOL_EXECUTION\",\n      category: \"mcp_tool_input_invalid\",\n      code: \"MCP_INVALID_PARAMS\",\n      retryable: false,\n      actionOwner: \"openwork\",\n      operatorAction: \"Correct the tool arguments using the latest advertised input schema; do not retry the same arguments unchanged.\",\n    }\n  }\n  if (numericCode !== undefined) return providerDeclaredErrorClassification()\n\n  const name = errorName(error)\n  if (name === \"InvalidClientError\" || name === \"UnauthorizedClientError\" || name === \"InvalidClientMetadataError\") {\n    return {\n      phase: \"AUTH_CLIENT_REGISTRATION\",\n      category: \"oauth_client_registration\",\n      code: \"MCP_OAUTH_CLIENT_REJECTED\",\n      retryable: false,\n      actionOwner: \"organization_admin\",\n      operatorAction: \"Verify the client registration, redirect URI, client type, and token endpoint authentication method.\",\n    }\n  }\n  if (name === \"InvalidGrantError\") {\n    return {\n      phase: fallbackPhase === \"CONTINUITY_REFRESH\" ? fallbackPhase : \"AUTH_TOKEN_ACQUISITION\",\n      category: \"oauth_token_failure\",\n      code: \"MCP_OAUTH_INVALID_GRANT\",\n      retryable: false,\n      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\",","sourceCodeStart":1240,"sourceCodeEnd":1276,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/ee/apps/den-api/src/capability-sources/external-mcp-diagnostics.ts#L1240-L1276","documentation":"Error \"MCP_OAUTH_CLIENT_REJECTED\" thrown in different-ai/openwork.","triggerScenarios":"Thrown at ee/apps/den-api/src/capability-sources/external-mcp-diagnostics.ts:1258 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"}