1use crate::Version;
2use thiserror::Error;
3
4#[derive(Error, Debug)]
5pub enum Error {
6 #[error("incorrect type: expected={expected}, actual={actual}")]
8 IncorrectType {
9 actual: String,
11
12 expected: String,
14 },
15
16 #[error(transparent)]
18 Io(#[from] std::io::Error),
19
20 #[error("no href")]
22 NoHref,
23
24 #[error("json value is not an object")]
26 NotAnObject(serde_json::Value),
27
28 #[error(transparent)]
30 SerdeJson(#[from] serde_json::Error),
31
32 #[error("unsupported migration: {0} to {1}")]
34 UnsupportedMigration(Version, Version),
35
36 #[error(transparent)]
38 UrlParse(#[from] url::ParseError),
39}