Download python/sdk/src/deepseek_harness/errors.py from SaylorTwift/deepseek-harness: direct link, hf CLI and curl.
- Browser
- Download file 660 Bytes
-
https://huggingface.co/SaylorTwift/deepseek-harness/resolve/main/python/sdk/src/deepseek_harness/errors.py
- Command line
-
hf download hf://SaylorTwift/deepseek-harness/python/sdk/src/deepseek_harness/errors.py
-
curl -L -o errors.py https://huggingface.co/SaylorTwift/deepseek-harness/resolve/main/python/sdk/src/deepseek_harness/errors.py
660 Bytes
| from __future__ import annotations | |
| class HarnessError(Exception): | |
| """Base exception for SDK and runtime failures.""" | |
| class TransportClosedError(HarnessError): | |
| """Raised when the runtime subprocess exits or closes stdout.""" | |
| class SdkProtocolError(HarnessError): | |
| """Raised when the runtime sends data outside the SDK protocol.""" | |
| class JsonRpcError(HarnessError): | |
| """Raised when the runtime returns a JSON-RPC error response.""" | |
| def __init__(self, code: int | None, message: str, data: object | None = None) -> None: | |
| super().__init__(message) | |
| self.code = code | |
| self.message = message | |
| self.data = data | |