khive_query/error.rs
1//! Query-layer error types for the GQL/SPARQL parse and compile pipeline.
2
3/// Errors produced by the query parsing and compilation pipeline.
4#[derive(Debug, thiserror::Error)]
5pub enum QueryError {
6 #[error("parse error at position {position}: {message}")]
7 Parse { position: usize, message: String },
8
9 #[error("compile error: {0}")]
10 Compile(String),
11
12 #[error("validation error: {0}")]
13 Validation(String),
14
15 #[error("unsupported feature: {0}")]
16 Unsupported(String),
17
18 /// A query parameter value is out of the allowed range (e.g. max_hops exceeds
19 /// the 10-hop depth cap, or a limit value overflows `i64`).
20 #[error("invalid input: {0}")]
21 InvalidInput(String),
22}