systemprompt_models/errors/row.rs
1//! Errors raised while decoding `HashMap<String, serde_json::Value>`
2//! row payloads produced by the runtime SQL adapter.
3//!
4//! Copyright (c) systemprompt.io — Business Source License 1.1.
5//! See <https://systemprompt.io> for licensing details.
6
7#[derive(Debug, Clone, thiserror::Error, PartialEq, Eq)]
8pub enum RowParseError {
9 #[error("missing or invalid field: {0}")]
10 Missing(&'static str),
11
12 #[error("{0}")]
13 OutOfRange(&'static str),
14
15 #[error("invalid identifier in field {field}")]
16 InvalidId {
17 field: &'static str,
18 #[source]
19 source: systemprompt_identifiers::error::IdValidationError,
20 },
21}