ワンクリックで
error-handling-basics
Essential Rust error handling rules for anyhow and thiserror users
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Essential Rust error handling rules for anyhow and thiserror users
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
Choosing and profiling the global allocator (jemalloc, mimalloc, system) in the backend-service `service` template
Request lifecycle, Tower layer ordering, and scaling choices in the backend-service `service` template
Observability wiring for the backend-service `service` template: metrique wide-event metrics, tracing logs, and optional dial9 runtime profiling
Setting up automated crate releases with release-plz and OIDC trusted publishing
Standard GitHub Actions CI structure for Rust projects using ci-battery-pack
Cross-platform binary builds for GitHub Releases with cargo-binstall support
SOC 職業分類に基づく
| name | error-handling-basics |
| description | Essential Rust error handling rules for anyhow and thiserror users |
Error reporters walk .source() separately. Including it in Display causes double-printing:
// Wrong
#[error("operation failed: {0}")]
MyError(#[source] io::Error)
// Right
#[error("operation failed")]
MyError(#[source] io::Error)
// Wrong: repeats what the source error already says
.context("file not found")
// Right: says what you were trying to do
.context("failed to load user config")
Set RUST_BACKTRACE=1 RUST_LIB_BACKTRACE=0. This gives panic backtraces without the performance cost of capturing one on every anyhow::Error.
For comprehensive patterns (opaque library errors, internal error composition, structured logging, custom application error types), install the error battery pack:
cargo install cargo-bp
cargo bp add error