# thiserror

16 Hacker News commenters recommended thiserror and 8 criticized it, November 2025 to November 2026. It was recommended in 5 of 13 months. It meets the Hacker Approved badge rule.

**Verdict:** Rust crate that removes the boilerplate of defining strongly-typed error types for libraries, and stays transparent to downstream users. Common caveat: it makes forwarding errors too easy and macro expansions hard to debug.

## Why people recommend it

- Removes boilerplate for error types (3 comments): "makes said boilerplate a non-issue and allows you to properly propagate strongly-typed errors with context" ([source](https://news.ycombinator.com/item?id=46154509)) "thiserror and anyhow are std::error::Error with fewer steps." ([source](https://news.ycombinator.com/item?id=48263486)) "Anyhow and thiserror are a cinch." ([source](https://news.ycombinator.com/item?id=48266910))
- Helps define standard library errors (3 comments): "thiserror for libraries, helping you create the standard library error types" ([source](https://news.ycombinator.com/item?id=48261194)) "Crates like thiserror make it easy to define your own error types" ([source](https://news.ycombinator.com/item?id=50265912)) "thiserror is an idiomatic approach these days" ([source](https://news.ycombinator.com/item?id=50266544))
- Pairs with anyhow for applications (3 comments): "Use thiserror to make error types in libraries, and anyhow in programs to handle them." ([source](https://news.ycombinator.com/item?id=46154689)) "thiserror¹ for libraries, anyhow² for applications" ([source](https://news.ycombinator.com/item?id=46549364)) "especially with crates like anyhow and thiserror" ([source](https://news.ycombinator.com/item?id=45780030))
- Good ergonomics with precise errors (3 comments): "Very very good ergonomics and completely transparent to downstream libraries." ([source](https://news.ycombinator.com/item?id=48341791)) "It's a nice compromise between being precise on your errors with your code" ([source](https://news.ycombinator.com/item?id=48341999)) "I use thiserror a lot to help with my impls." ([source](https://news.ycombinator.com/item?id=48261895))

## What people warn about

- Hard to debug macro expansions (2 comments): "Now I'm debugging macro expansion errors and spending approximately the same amount of time" ([source](https://news.ycombinator.com/item?id=48262123)) "I spend ridiculous and unpredictable amounts of time debugging macro expansions" ([source](https://news.ycombinator.com/item?id=46154079))
- Encourages forwarding and public error enums (3 comments): "thiserror actually encourages this sort of implementation leak" ([source](https://news.ycombinator.com/item?id=46423658)) "encourages a public error enum which to me is an anti-pattern" ([source](https://news.ycombinator.com/item?id=46414637)) "The thiserror crate makes it too easy to just foreward errors" ([source](https://news.ycombinator.com/item?id=46493264))
- Tedious alongside other error crates (2 comments): "Handling both types of these errors with `thiserror` can be tedious for little benefit." ([source](https://news.ycombinator.com/item?id=48269709)) "Rust has three main error systems (io::Error, thiserror, and anyhow), which is a pain" ([source](https://news.ycombinator.com/item?id=48260995))

## Alternatives hackers recommend

- [anyhow (Rust crate)](https://hackerapproved.com/p/anyhow.md): 34 recommend
- [Rayon](https://hackerapproved.com/p/rayon.md): 18 recommend
- [rand crate](https://hackerapproved.com/p/rand-crate.md): 9 recommend
- [Facet (Rust reflection library)](https://hackerapproved.com/p/facet.md): 6 recommend
- [Surelock](https://hackerapproved.com/p/surelock.md): 6 recommend

## Cite as

Hacker Approved, "thiserror", https://hackerapproved.com/p/thiserror/ (counts from 1,795,640 Hacker News comments, November 2025 to November 2026).
