Document pydantic.ValidationError in client Raises sections (#3036)
This commit is contained in:
parent
410cc0db31
commit
dcf8a6a0b5
2 changed files with 8 additions and 0 deletions
|
|
@ -629,6 +629,8 @@ class Client:
|
|||
Raises:
|
||||
InputRequiredRoundsExceededError: `input_required_max_rounds` exhausted.
|
||||
MCPError: A callback returned `ErrorData` for an embedded input request.
|
||||
pydantic.ValidationError: The server returned a result that does not
|
||||
conform to the negotiated protocol version.
|
||||
"""
|
||||
|
||||
async def retry(r: InputResponses | None, s: str | None) -> ReadResourceResult | InputRequiredResult:
|
||||
|
|
@ -711,6 +713,8 @@ class Client:
|
|||
Raises:
|
||||
InputRequiredRoundsExceededError: `input_required_max_rounds` exhausted.
|
||||
MCPError: A callback returned `ErrorData` for an embedded input request.
|
||||
pydantic.ValidationError: The server returned a result that does not
|
||||
conform to the negotiated protocol version.
|
||||
"""
|
||||
|
||||
async def retry(r: InputResponses | None, s: str | None) -> CallToolResult | InputRequiredResult | Result:
|
||||
|
|
@ -787,6 +791,8 @@ class Client:
|
|||
Raises:
|
||||
InputRequiredRoundsExceededError: `input_required_max_rounds` exhausted.
|
||||
MCPError: A callback returned `ErrorData` for an embedded input request.
|
||||
pydantic.ValidationError: The server returned a result that does not
|
||||
conform to the negotiated protocol version.
|
||||
"""
|
||||
|
||||
async def retry(r: InputResponses | None, s: str | None) -> GetPromptResult | InputRequiredResult:
|
||||
|
|
|
|||
|
|
@ -452,6 +452,8 @@ class ClientSession:
|
|||
MCPError: Error response, read timeout, or connection closed.
|
||||
RuntimeError: Called before entering the context manager.
|
||||
ValueError: The request declares `name_param` but its params carry no string name.
|
||||
pydantic.ValidationError: The server returned a result that does not
|
||||
conform to the negotiated protocol version.
|
||||
"""
|
||||
data = request.model_dump(by_alias=True, mode="json", exclude_none=True)
|
||||
method: str = data["method"]
|
||||
|
|
|
|||
Loading…
Reference in a new issue