[PR #3387] [MERGED] More error handling simplification #3797

Closed
opened 2026-03-16 12:03:13 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/3387
Author: @djc
Created: 12/9/2025
Status: Merged
Merged: 12/11/2025
Merged by: @djc

Base: mainHead: rm-backtrace


📝 Commits (10+)

  • ccc338a Drop runtime backtraces from error types
  • 1149c17 proto: promote NetErrorKind to NetError
  • 83b192c proto: promote http::ErrorKind to http::Error
  • 6a4c0e6 proto: drop http error and Result aliases
  • 77bc599 proto: fold http error module into http root
  • 2691f09 proto: fold http::response module into http root
  • 8ae7a69 proto: move http constants down
  • 6e18bf2 proto: fold http::request module into http root
  • 06c1b9d proto: move http to be a single file
  • 4191db3 proto: fold http::Error into NetError

📊 Changes

108 files changed (+1386 additions, -2362 deletions)

View changed files

📝 .github/dependabot.yml (+0 -3)
📝 Cargo.lock (+1 -62)
📝 Cargo.toml (+0 -1)
📝 bin/Cargo.toml (+2 -0)
📝 bin/benches/comparison_benches.rs (+4 -3)
📝 bin/src/lib.rs (+23 -5)
📝 bin/tests/integration/named_metrics_tests.rs (+2 -5)
📝 crates/proto/Cargo.toml (+0 -3)
📝 crates/proto/README.md (+1 -2)
📝 crates/proto/src/client/dnssec_client.rs (+5 -6)
📝 crates/proto/src/client/mod.rs (+13 -26)
📝 crates/proto/src/client/rc_stream.rs (+4 -4)
📝 crates/proto/src/dnssec/crypto.rs (+7 -7)
📝 crates/proto/src/dnssec/handle.rs (+18 -23)
📝 crates/proto/src/dnssec/mod.rs (+15 -85)
📝 crates/proto/src/dnssec/rdata/tsig.rs (+5 -5)
📝 crates/proto/src/dnssec/signer.rs (+2 -2)
📝 crates/proto/src/dnssec/tsig.rs (+3 -3)
📝 crates/proto/src/error.rs (+102 -200)
📝 crates/proto/src/h2/h2_client_stream.rs (+11 -21)

...and 80 more files

📄 Description

This starts from the premise of removing the backtrace feature and then sort of meanders from there...

IMO the backtrace feature is something that most Rust libraries don't use, and as long as we otherwise keep our error handling reasonably up to snuff, I don't think we need it to generate good errors. We can always refine our errors if some errors end up being too unclear about what's going on. The error/kind split imposed a good deal of complexity that would be nice to get rid of.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hickory-dns/hickory-dns/pull/3387 **Author:** [@djc](https://github.com/djc) **Created:** 12/9/2025 **Status:** ✅ Merged **Merged:** 12/11/2025 **Merged by:** [@djc](https://github.com/djc) **Base:** `main` ← **Head:** `rm-backtrace` --- ### 📝 Commits (10+) - [`ccc338a`](https://github.com/hickory-dns/hickory-dns/commit/ccc338aa884dab8ed055017012f72beebb8b0a2e) Drop runtime backtraces from error types - [`1149c17`](https://github.com/hickory-dns/hickory-dns/commit/1149c17bea1e38e0ec556cdd3041de2e99a2c50c) proto: promote NetErrorKind to NetError - [`83b192c`](https://github.com/hickory-dns/hickory-dns/commit/83b192cce069995f2c3bec223c30aebfe459d168) proto: promote http::ErrorKind to http::Error - [`6a4c0e6`](https://github.com/hickory-dns/hickory-dns/commit/6a4c0e6d6c2aa500474949fb4186c3f7a62dd263) proto: drop http error and Result aliases - [`77bc599`](https://github.com/hickory-dns/hickory-dns/commit/77bc5990b162f16ebb5d76d043235dd72ed7274b) proto: fold http error module into http root - [`2691f09`](https://github.com/hickory-dns/hickory-dns/commit/2691f09dbd7a3a5b7519b2aaa4490db2df0af163) proto: fold http::response module into http root - [`8ae7a69`](https://github.com/hickory-dns/hickory-dns/commit/8ae7a6928870b7587f982a549f1a7893395ff43b) proto: move http constants down - [`6e18bf2`](https://github.com/hickory-dns/hickory-dns/commit/6e18bf2255574b49d2639a8159767d3219ace33e) proto: fold http::request module into http root - [`06c1b9d`](https://github.com/hickory-dns/hickory-dns/commit/06c1b9da21510b98face5963698b7a07eb46f24f) proto: move http to be a single file - [`4191db3`](https://github.com/hickory-dns/hickory-dns/commit/4191db345878f673e71122f0850e3bdce0b12bad) proto: fold http::Error into NetError ### 📊 Changes **108 files changed** (+1386 additions, -2362 deletions) <details> <summary>View changed files</summary> 📝 `.github/dependabot.yml` (+0 -3) 📝 `Cargo.lock` (+1 -62) 📝 `Cargo.toml` (+0 -1) 📝 `bin/Cargo.toml` (+2 -0) 📝 `bin/benches/comparison_benches.rs` (+4 -3) 📝 `bin/src/lib.rs` (+23 -5) 📝 `bin/tests/integration/named_metrics_tests.rs` (+2 -5) 📝 `crates/proto/Cargo.toml` (+0 -3) 📝 `crates/proto/README.md` (+1 -2) 📝 `crates/proto/src/client/dnssec_client.rs` (+5 -6) 📝 `crates/proto/src/client/mod.rs` (+13 -26) 📝 `crates/proto/src/client/rc_stream.rs` (+4 -4) 📝 `crates/proto/src/dnssec/crypto.rs` (+7 -7) 📝 `crates/proto/src/dnssec/handle.rs` (+18 -23) 📝 `crates/proto/src/dnssec/mod.rs` (+15 -85) 📝 `crates/proto/src/dnssec/rdata/tsig.rs` (+5 -5) 📝 `crates/proto/src/dnssec/signer.rs` (+2 -2) 📝 `crates/proto/src/dnssec/tsig.rs` (+3 -3) 📝 `crates/proto/src/error.rs` (+102 -200) 📝 `crates/proto/src/h2/h2_client_stream.rs` (+11 -21) _...and 80 more files_ </details> ### 📄 Description This starts from the premise of removing the backtrace feature and then sort of meanders from there... IMO the backtrace feature is something that most Rust libraries don't use, and as long as we otherwise keep our error handling reasonably up to snuff, I don't think we need it to generate good errors. We can always refine our errors if some errors end up being too unclear about what's going on. The error/kind split imposed a good deal of complexity that would be nice to get rid of. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 12:03:13 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#3797
No description provided.