-
Notifications
You must be signed in to change notification settings - Fork 156
Improve error messaging when DCR is unsupported for remote MCP servers #2696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add clear, actionable error messages when OAuth providers do not support
Dynamic Client Registration (DCR), helping users understand why authentication
fails and how to configure client credentials manually.
Changes:
- Detect missing registration_endpoint in OIDC discovery document
- Recognize HTTP status codes indicating DCR is unavailable (404, 405, 501)
- Provide actionable guidance directing users to --remote-auth-client-id and --remote-auth-client-secret flags
- Add comprehensive test coverage for all DCR unsupported scenarios
Error message improvements:
- Before: "dynamic client registration failed with status 404: {...}"
- After: "this provider does not support Dynamic Client Registration (DCR) - HTTP 404. Please configure OAuth client credentials using --remote-auth-client-id and --remote-auth-client-secret flags, or register a client manually with the provider"
Fixes stacklok#2680
Signed-off-by: 4t8dd <wanger.xyz@gmail.com>
|
Thanks @4t8dd , approved, let's see what the CI gods say 👍 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2696 +/- ##
==========================================
+ Coverage 55.59% 55.61% +0.01%
==========================================
Files 314 314
Lines 30445 30456 +11
==========================================
+ Hits 16925 16937 +12
+ Misses 12033 12032 -1
Partials 1487 1487 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@4t8dd There's some linting issues it seems, to see these locally run |
sure. Thanks for the info. I will fix this then. |
Signed-off-by: 4t8dd <wanger.xyz@gmail.com>
|
@ChrisJBurns I just updated this branch with lint fix. I guess the CI should be manually activated again. |
|
I will check this again. |
|
@ChrisJBurns I check this error it looks have nothing to do with my patch. |
|
I close this and open a new one based on the latest update. |
Add clear, actionable error messages when OAuth providers do not support Dynamic Client Registration (DCR), helping users understand why authentication fails and how to configure client credentials manually.
Changes:
Error message improvements:
Fixes #2680