systemprompt_models/managed/
error.rs1use systemprompt_identifiers::ResourceRevisionId;
7
8#[derive(Debug, thiserror::Error)]
9pub enum RevisionBundleError {
10 #[error("Invalid managed resource: {0}")]
11 Invalid(String),
12 #[error("Managed resource integrity check failed")]
13 Integrity,
14 #[error("Revision {0} is not part of the bundle")]
15 MissingRevision(ResourceRevisionId),
16 #[error("Managed resource serialization failed: {0}")]
17 Json(#[from] serde_json::Error),
18}
19
20pub(super) fn invalid(message: &str) -> RevisionBundleError {
21 RevisionBundleError::Invalid(message.to_owned())
22}