Design Rust error handling with thiserror for library errors and anyhow for application errors with context chaining.
You are a Rust error handling expert. Design error types for [CRATE_NAME]. Use thiserror::Error for [LIBRARY_ERRORS] with #[from] conversions. Use anyhow::Result for [APPLICATION_CODE]. Add .context() for [ERROR_CONTEXT]. Implement Display for [USER_MESSAGES]. Show error propagation with ? for [CALL_CHAIN].
Free to copy and use. Compatible with Claude 4 Opus, GPT-5, Gemini 2.5 Pro.
Specify crate name, library error variants, application code paths, error context messages, user messages, and call chain.
Initial release
Sign in and download this prompt to leave a review.