Get a user-friendly suggestion for how to resolve this error.
(&self)
| 365 | |
| 366 | /// Get a user-friendly suggestion for how to resolve this error. |
| 367 | pub fn suggestion(&self) -> Option<&'static str> { |
| 368 | match self { |
| 369 | Self::ConnectionFailed { .. } => { |
| 370 | Some("Check your network connection and verify the remote URL is correct.") |
| 371 | } |
| 372 | Self::AuthenticationFailed { .. } => { |
| 373 | Some("Check your credentials. You may need to run 'atomic identity prove'.") |
| 374 | } |
| 375 | Self::RepositoryNotFound { .. } => { |
| 376 | Some("Verify the repository URL is correct and you have access.") |
| 377 | } |
| 378 | Self::ViewNotFound { .. } => { |
| 379 | Some("Check the view name. Use 'atomic view list' to see available views.") |
| 380 | } |
| 381 | Self::MissingDependencies { .. } => { |
| 382 | Some("Push the missing dependencies first, or use '--all' to push all changes.") |
| 383 | } |
| 384 | Self::Timeout { .. } => { |
| 385 | Some("The server may be slow. Try again or increase the timeout.") |
| 386 | } |
| 387 | Self::EmptyView { .. } => Some("The view has no changes yet."), |
| 388 | Self::VersionMismatch { .. } => { |
| 389 | Some("Run 'atomic update' to upgrade your CLI, or contact the server owner.") |
| 390 | } |
| 391 | _ => None, |
| 392 | } |
| 393 | } |
| 394 | } |
| 395 | |
| 396 | // Tests |
nothing calls this directly
no outgoing calls
no test coverage detected