McpServerException
Exception thrown when MCP server returns an error response.
McpServerException::__construct()
public function __construct(string $message, int $errorCode, ?array $errorData = null, ?string $serverName = null):Parameters
| Name | Type | Description |
|---|---|---|
| $message | string | Error message |
| $errorCode | int | MCP error code |
| $errorData | (array<string, mixed> | null) | Additional error data from the server |
| $serverName | (string | null) | Name of the MCP server |