Describes a filesystem error.
| 15070 | # Experimental: this type is part of an experimental API and may change or be removed. |
| 15071 | @dataclass |
| 15072 | class SessionFSError: |
| 15073 | """Describes a filesystem error.""" |
| 15074 | |
| 15075 | code: SessionFSErrorCode |
| 15076 | """Error classification""" |
| 15077 | |
| 15078 | message: str | None = None |
| 15079 | """Free-form detail about the error, for logging/diagnostics""" |
| 15080 | |
| 15081 | @staticmethod |
| 15082 | def from_dict(obj: Any) -> 'SessionFSError': |
| 15083 | assert isinstance(obj, dict) |
| 15084 | code = SessionFSErrorCode(obj.get("code")) |
| 15085 | message = from_union([from_str, from_none], obj.get("message")) |
| 15086 | return SessionFSError(code, message) |
| 15087 | |
| 15088 | def to_dict(self) -> dict: |
| 15089 | result: dict = {} |
| 15090 | result["code"] = to_enum(SessionFSErrorCode, self.code) |
| 15091 | if self.message is not None: |
| 15092 | result["message"] = from_union([from_str, from_none], self.message) |
| 15093 | return result |
| 15094 | |
| 15095 | # Experimental: this type is part of an experimental API and may change or be removed. |
| 15096 | @dataclass |
no outgoing calls
no test coverage detected
searching dependent graphs…