MCPcopy Index your code
hub / github.com/commandoperator/cmdop-sdk / _stream_error

Function _stream_error

python/src/cmdop/streaming.py:36–41  ·  view source on GitHub ↗

Raise the typed PIN exception for a PIN-gate verdict; otherwise the generic :class:`AgentStreamError` (the ask stream's error-frame contract).

(code: str, message: str)

Source from the content-addressed store, hash-verified

34
35
36def _stream_error(code: str, message: str) -> CmdopError:
37 """Raise the typed PIN exception for a PIN-gate verdict; otherwise the
38 generic :class:`AgentStreamError` (the ask stream's error-frame contract)."""
39 if code in _TYPED_STREAM_ERROR_CODES:
40 return map_core_error(code, message)
41 return AgentStreamError(code or "internal", message or "")
42
43if TYPE_CHECKING:
44 from collections.abc import AsyncIterator

Callers 2

__aiter__Method · 0.85
collectMethod · 0.85

Calls 2

map_core_errorFunction · 0.90
AgentStreamErrorClass · 0.90

Tested by

no test coverage detected