Error messages should provide clear, actionable information that helps users understand and resolve the problem. Each error should:

  1. Include specific context about what failed
  2. Explain why it failed
  3. When applicable, suggest how to fix it

Example of improving error messages:

// Instead of:
#[error(transparent)]
ManagedPythonError(#[from] managed::Error),

// Prefer:
#[error("Failed to discover managed Python installations")]
ManagedPythonError(#[from] managed::Error),

// Even better with context and remedy:
#[error("Failed to authenticate with {url}")]
#[error("hint: Check your credentials or configure authentication using UV_INDEX_{index}_USERNAME")]
AuthenticationError { url: String, index: String }

When designing error handling: