Skip to content

Conversation

@trungutt
Copy link
Contributor

At the moment, most of remote MCP servers fail at tools discovery (but they might also fail at tool execution in the future).

This PR creates MayBeOAuthError function that examines if an error is related to OAuth, then decorates the error with necessary metadata (like serverURL). This function can be used in any place where a failure related to OAuth can happen. It only handles ToolsetError at tool discovery for now, we can add other types of error if needed. The most important thing is always give context to an Oauth error (which serverURL for example).

This also moves more things to oauth package and simplify logic in runtime.go.

Signed-off-by: Trung Nguyen <trung.nguyen@docker.com>
@trungutt trungutt requested a review from a team as a code owner September 17, 2025 20:46
@trungutt trungutt merged commit 5ad3082 into docker:main Sep 18, 2025
5 checks passed
@trungutt trungutt deleted the refactor-oauth-error branch September 22, 2025 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants