Skip to content

fix(auth): structure metadata discovery errors - #1280

Open
ASTion24 wants to merge 1 commit into
modelcontextprotocol:mainfrom
ASTion24:fix/structured-auth-discovery-errors
Open

ASTion24 wants to merge 1 commit into
modelcontextprotocol:mainfrom
ASTion24:fix/structured-auth-discovery-errors

Conversation

@ASTion24

Copy link
Copy Markdown

Summary

  • replace protected resource metadata discovery failures encoded as MetadataError(String) with structured AuthError variants
  • preserve HTTP discovery errors as source
  • expose invalid metadata reasons and exhausted authorization server candidates as fields
  • box the detailed metadata reason to keep AuthError below Clippy's result_large_err threshold

Testing

  • cargo test --all-features
  • cargo clippy --all-targets --all-features -- -D warnings

Fixes #1265

@ASTion24
ASTion24 requested a review from a team as a code owner September 16, 2026 05:02
@github-actions github-actions Bot added T-core Core library changes T-transport Transport layer changes labels Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-core Core library changes T-transport Transport layer changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

auth: report protected resource metadata discovery failures as structured AuthError variants

1 participant