| 8 | /// Main error type for GraphLite SDK operations |
| 9 | #[derive(Error, Debug)] |
| 10 | pub enum Error { |
| 11 | /// Error from the core GraphLite library |
| 12 | #[error("GraphLite error: {0}")] |
| 13 | GraphLite(String), |
| 14 | |
| 15 | /// Session-related errors |
| 16 | #[error("Session error: {0}")] |
| 17 | Session(String), |
| 18 | |
| 19 | /// Query execution errors |
| 20 | #[error("Query error: {0}")] |
| 21 | Query(String), |
| 22 | |
| 23 | /// Transaction errors |
| 24 | #[error("Transaction error: {0}")] |
| 25 | Transaction(String), |
| 26 | |
| 27 | /// Serialization/deserialization errors |
| 28 | #[error("Serialization error: {0}")] |
| 29 | Serialization(#[from] serde_json::Error), |
| 30 | |
| 31 | /// Type conversion errors |
| 32 | #[error("Type conversion error: {0}")] |
| 33 | TypeConversion(String), |
| 34 | |
| 35 | /// Invalid operation errors |
| 36 | #[error("Invalid operation: {0}")] |
| 37 | InvalidOperation(String), |
| 38 | |
| 39 | /// Resource not found errors |
| 40 | #[error("Not found: {0}")] |
| 41 | NotFound(String), |
| 42 | |
| 43 | /// Connection errors |
| 44 | #[error("Connection error: {0}")] |
| 45 | Connection(String), |
| 46 | |
| 47 | /// I/O errors |
| 48 | #[error("I/O error: {0}")] |
| 49 | Io(#[from] std::io::Error), |
| 50 | } |
| 51 | |
| 52 | impl From<String> for Error { |
| 53 | fn from(s: String) -> Self { |
no outgoing calls
no test coverage detected