Update name to gitlore instead of gitlab-inbox
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
//! Custom error types for gitlab-inbox.
|
||||
//! Custom error types for gitlore.
|
||||
//!
|
||||
//! Uses thiserror for ergonomic error definitions with structured error codes.
|
||||
|
||||
@@ -65,10 +65,10 @@ impl ErrorCode {
|
||||
}
|
||||
}
|
||||
|
||||
/// Main error type for gitlab-inbox.
|
||||
/// Main error type for gitlore.
|
||||
#[derive(Error, Debug)]
|
||||
pub enum GiError {
|
||||
#[error("Config file not found at {path}. Run \"gi init\" first.")]
|
||||
#[error("Config file not found at {path}. Run \"lore init\" first.")]
|
||||
ConfigNotFound { path: String },
|
||||
|
||||
#[error("Invalid config: {details}")]
|
||||
@@ -158,18 +158,18 @@ impl GiError {
|
||||
/// Get a suggestion for how to fix this error.
|
||||
pub fn suggestion(&self) -> Option<&'static str> {
|
||||
match self {
|
||||
Self::ConfigNotFound { .. } => Some("Run 'gi init' to create configuration"),
|
||||
Self::ConfigInvalid { .. } => Some("Check config file syntax or run 'gi init' to recreate"),
|
||||
Self::ConfigNotFound { .. } => Some("Run 'lore init' to create configuration"),
|
||||
Self::ConfigInvalid { .. } => Some("Check config file syntax or run 'lore init' to recreate"),
|
||||
Self::GitLabAuthFailed => Some("Verify token has read_api scope and is not expired"),
|
||||
Self::GitLabNotFound { .. } => Some("Check the resource path exists and you have access"),
|
||||
Self::GitLabRateLimited { .. } => Some("Wait and retry, or reduce request frequency"),
|
||||
Self::GitLabNetworkError { .. } => Some("Check network connection and GitLab URL"),
|
||||
Self::DatabaseLocked { .. } => Some("Wait for other sync to complete or use --force"),
|
||||
Self::MigrationFailed { .. } => Some("Check database file permissions or reset with 'gi reset'"),
|
||||
Self::MigrationFailed { .. } => Some("Check database file permissions or reset with 'lore reset'"),
|
||||
Self::TokenNotSet { .. } => Some("Export the token environment variable"),
|
||||
Self::Database(_) => Some("Check database file permissions or reset with 'gi reset'"),
|
||||
Self::Database(_) => Some("Check database file permissions or reset with 'lore reset'"),
|
||||
Self::Http(_) => Some("Check network connection"),
|
||||
Self::NotFound(_) => Some("Verify the entity exists using 'gi list'"),
|
||||
Self::NotFound(_) => Some("Verify the entity exists using 'lore list'"),
|
||||
Self::Ambiguous(_) => Some("Use --project flag to disambiguate"),
|
||||
_ => None,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user