원클릭으로
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 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
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
| 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