Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Allow setting an explanatory string on the Error struct

Open
#128 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust

Research direction

Start by locating the Error struct and the Error::invalid constructor used when custom typed header parsing fails. Review how errors are created and displayed, then determine the intended optional explanatory-string API and its compatibility impact. Done means parsing failures can carry and expose the added explanation without breaking existing callers.

Written by the indexing model from the issue text.

Description

I was trying to add some explanation on why header parsing fails to a custom typed header and couldn't do so because the error class doesn't have a way to add additional information.

I was thinking one could change the invalid signature to Error::invalid(Option<String>) so that a custom error message could be optionally added when parsing fails?

Would love to hear thoughts on this.

Dominant language
Rust
Stars
200
Forks
107
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from hyperium/headers

All issues in hyperium/headers

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.