routee_compass/plugin/
plugin_error.rs1use super::input::InputPluginError;
2use super::output::OutputPluginError;
3
4#[derive(thiserror::Error, Debug)]
5pub enum PluginError {
6 #[error("failure building plugin: {0}")]
7 BuildFailed(String),
8 #[error("required query field '{0}' for plugin {1} not found")]
9 MissingExpectedQueryField(String, String),
10 #[error("failure running input plugin: {source}")]
11 InputPluginFailed {
12 #[from]
13 source: InputPluginError,
14 },
15 #[error("failure running output plugin: {source}")]
16 OutputPluginFailed {
17 #[from]
18 source: OutputPluginError,
19 },
20 #[error("plugin experienced JSON error: {source}")]
21 JsonError {
22 #[from]
23 source: serde_json::Error,
24 },
25 #[error("expected query to be a json object '{{}}' but found {0}")]
26 UnexpectedQueryStructure(String),
27 #[error("unexpected error: {0}")]
28 InternalError(String),
29}