Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Teaches HASH's error-stack patterns for Rust error types, Report propagation, change_context, and attach context.
45% 95%+50 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 10 of 22 without it.
3 of 3 safety checks passed
Not used yet
HASH-specific error handling patterns using the error-stack crate for consistent, debuggable error handling across the Rust codebase.
HASH uses error-stack exclusively for error handling:
✅ DO:
Report<MyError> for all error typesReport<MyError>Error from core::error:: (not std::error::)ResultExt as _ for trait methods❌ DON'T:
anyhow or eyre cratesBox<dyn Error> (except in tests/prototyping)Report<Box<dyn Error>>thiserror (use derive_more instead)HashQL compiler code uses a different error handling approach.
Code in libs/@local/hashql/* uses the hashql-diagnostics crate instead of error-stack. This is because compiler errors require rich formatting capabilities:
Which approach to use:
| Location | Error Handling |
|---|---|
libs/@local/hashql/* (compiler code) | Use hashql-diagnostics → See writing-hashql-diagnostics skill |
| Everywhere else | Use error-stack patterns from this skill |
Next to this one in the catalogue, plus more from the same author.