{"record":{"id":"713c085a81e5df3c","repo":"different-ai/openwork","slug":"no-oauth-metadata-was-found-for-the-selected-issue","errorCode":null,"errorMessage":"No OAuth metadata was found for the selected issuer ${selectedIssuer}.","messagePattern":"No OAuth metadata was found for the selected issuer (.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/enterprise-mcp-client/src/oauth-provider.ts","lineNumber":240,"sourceCode":"    if (!selectedIssuer) return undefined\n    if (isEquivalentOAuthDiscoveryAlias(this.verifiedAuthorizationServerMetadata?.issuer, selectedIssuer)) {\n      return this.verifiedAuthorizationServerMetadata\n    }\n\n    let metadata: AuthorizationServerMetadata | undefined\n    try {\n      metadata = await discoverAuthorizationServerMetadata(selectedIssuer, { fetchFn: this.fetch })\n    } catch (error) {\n      if (error instanceof IssuerMismatchError) {\n        throw new EnterpriseMcpOAuthContractError(\n          \"MCP_OAUTH_ISSUER_MISMATCH\",\n          \"The selected OAuth issuer could not be verified against its canonical metadata.\",\n        )\n      }\n      throw error\n    }\n    if (!metadata) {\n      throw new Error(`No OAuth metadata was found for the selected issuer ${selectedIssuer}.`)\n    }\n    this.verifiedAuthorizationServerMetadata = metadata\n    return metadata\n  }\n\n  private hasCurrentMetadataVerification(state: OAuthDiscoveryState, selectedIssuer: string): boolean {\n    const verification = (state as VerifiedOAuthDiscoveryState).openworkMetadataVerification\n    // The stamp records the canonical metadata issuer; the selected issuer may\n    // be its equivalent root trailing-slash alias (RFC 8414's one tolerance).\n    return verification?.version === 1\n      && isEquivalentOAuthDiscoveryAlias(verification.issuer, selectedIssuer)\n      && state.authorizationServerUrl === verification.issuer\n      && state.authorizationServerMetadata?.issuer === verification.issuer\n  }\n\n  private async normalizeDiscoveryState(state: OAuthDiscoveryState | undefined): Promise<VerifiedOAuthDiscoveryState | undefined> {\n    const selectedIssuer = this.authorizationServerIssuer\n    if (!selectedIssuer) return state","sourceCodeStart":222,"sourceCodeEnd":258,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/packages/enterprise-mcp-client/src/oauth-provider.ts#L222-L258","documentation":"Error \"No OAuth metadata was found for the selected issuer ${selectedIssuer}.\" thrown in different-ai/openwork.","triggerScenarios":"Thrown at packages/enterprise-mcp-client/src/oauth-provider.ts:240 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"}