MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / from_string

Function from_string

sdk-python/src/graphlite_sdk/error.py:83–89  ·  view source on GitHub ↗

Convert a string to GraphLiteCoreError.

(message: Union[str, bytes])

Source from the content-addressed store, hash-verified

81# ============================================================================
82
83def from_string(message: Union[str, bytes]) -> GraphLiteCoreError:
84 """
85 Convert a string to GraphLiteCoreError.
86 """
87 if isinstance(message, bytes):
88 message = message.decode('utf-8', errors='replace')
89 return GraphLiteCoreError(message)
90
91
92def from_json_error(error: json.JSONDecodeError) -> SerializationError:

Callers

nothing calls this directly

Calls 1

GraphLiteCoreErrorClass · 0.85

Tested by

no test coverage detected