#[derive(Debug, thiserror::Error, miette::Diagnostic, Clone)]
#[non_exhaustive]
pub enum WizardError {
#[error("wizard cancelled")]
#[diagnostic(code(rtb::tui::wizard_cancelled))]
Cancelled,
#[error("wizard interrupted (Ctrl+C)")]
#[diagnostic(code(rtb::tui::wizard_interrupted))]
Interrupted,
#[error("wizard step `{step}` failed: {message}")]
#[diagnostic(code(rtb::tui::wizard_step))]
Step {
step: String,
message: String,
},
}
#[derive(Debug, thiserror::Error, miette::Diagnostic, Clone)]
#[non_exhaustive]
pub enum RenderError {
#[error("JSON serialisation failed: {0}")]
#[diagnostic(code(rtb::tui::render_json))]
Json(String),
}