use thiserror::Error;
#[derive(Debug, Error)]
pub enum MigrationError {
#[error("Authentication failed: {0}")]
AuthenticationFailed(String),
#[error("Repository not found: {0}")]
RepositoryNotFound(String),
#[error("Git clone failed: {0}")]
GitCloneFailed(String),
#[error("Git push failed: {0}")]
GitPushFailed(String),
#[error("API request failed: {0}")]
ApiError(String),
#[error("Rate limit exceeded, retry after {0} seconds")]
RateLimitExceeded(u64),
#[error("Network error: {0}")]
NetworkError(String),
#[error("Invalid configuration: {0}")]
InvalidConfig(String),
#[error("Verification failed: {0}")]
VerificationFailed(String),
#[error("Unsupported feature: {0}")]
UnsupportedFeature(String),
#[error("I/O error: {0}")]
IoError(#[from] std::io::Error),
#[error("JSON parsing error: {0}")]
JsonError(#[from] serde_json::Error),
#[error("HTTP error: {0}")]
HttpError(#[from] reqwest::Error),
}
pub type Result<T> = std::result::Result<T, MigrationError>;