MCPcopy Index your code
hub / github.com/modelcontextprotocol/python-sdk / from_error_data

Method from_error_data

src/mcp/shared/exceptions.py:48–49  ·  view source on GitHub ↗
(cls, error: ErrorData)

Source from the content-addressed store, hash-verified

46
47 @classmethod
48 def from_error_data(cls, error: ErrorData) -> MCPError:
49 return cls(code=error.code, message=error.message, data=error.data)
50
51 def __str__(self) -> str:
52 return self.message

Callers 4

_on_requestMethod · 0.80
from_jsonrpc_errorMethod · 0.80
_dump_resultFunction · 0.80
_innerMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected