Skip to content

Commit cc4e911

Browse files
committed
Describe OAuthTokenError's client-side raise on the client OAuth page
OAuthTokenError is no longer only the token endpoint's rejection: a stored client record whose token_endpoint_auth_method this client cannot apply raises it while the token request is being built, before the endpoint is contacted. Say so, parallel to the OAuthRegistrationError half of the same sentence. No-Verification-Needed: doc-only change
1 parent 40fe046 commit cc4e911

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/client/oauth-clients.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ There is one more no-human situation: the client belongs to an enterprise whose
131131

132132
## When it fails
133133

134-
When the OAuth flow goes wrong, the provider raises an `OAuthFlowError` from `mcp.client.auth`. It has two subclasses. `OAuthRegistrationError` means registration did not yield a client you can use: the authorization server refused to register you, or it did register you but with credentials this flow cannot use (for instance an authentication method it does not implement). `OAuthTokenError` means the token endpoint said no. One `except OAuthFlowError:` covers discovery, registration, authorization, and exchange.
134+
When the OAuth flow goes wrong, the provider raises an `OAuthFlowError` from `mcp.client.auth`. It has two subclasses. `OAuthRegistrationError` means registration did not yield a client you can use: the authorization server refused to register you, or it did register you but with credentials this flow cannot use (for instance an authentication method it does not implement). `OAuthTokenError` means a token could not be obtained: the token endpoint said no, or a stored client record carries an authentication method this client cannot apply, which is reported while building the token request rather than sent. One `except OAuthFlowError:` covers discovery, registration, authorization, and exchange.
135135

136136
Not everything is a flow error. The network can still fail; those are ordinary `httpx2` exceptions and pass through untouched.
137137

0 commit comments

Comments
 (0)