Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Dec 4, 2025

Bumps human-errors from 0.1.5 to 0.2.1.

Release notes

Sourced from human-errors's releases.

Version 0.2.1

Changes

  • Improved handling for advice (ensuring that only non-duplicate entries are shown).
  • Improved Debug representation for wrapped errors (using a more descriptive struct name).

Version 0.2.0

⚠️ This is a major breaking change which will require you to rewrite your code if you chose to adopt it (we will continue to maintain the v0.1.x branch which offers a different approach to this problem).

The major difference here is a shift away from using a custom error type (generated using the error_shim!(...) macro in v0.1) to instead using a standard error type with better support for providing additional advice, and improved interoperability with the standard library's Error type. We've also shifted from using impl From<E> for MyErrorType as the primary means of wrapping errors to instead providing extensions for Results<T, E> which simplify wrapping errors with contextual advice (a pattern which was used extensively within codebases implementing human_errors).

What's Changed

Before

use human_errors;
use std::fs;
human_errors::error_shim!(MyError);
fn read_config() -> Result<String, MyError> {
fs::read_to_string("config.toml").map_err(|err| {
user_with_internal(
"We could not read the configuration file.",
"Make sure that you've specified a valid config file with the --config option.",
err
)
})
}

After

use human_errors::ResultExt;
use std::fs;
fn read_config() -> Result<String, human_errors::Error> {
fs::read_to_string("config.toml").wrap_err_as_user(
"We could not read the configuration file.",
&["Make sure that you've specified a valid config file with the --config option."])
}

Migration Instructions

  1. Remove any human_errors::error_shim!(MyErrorType) usage and replace all usage of MyErrorType with human_errors::Error.
  2. Replace any calls to human_errors::description(msg) with msg) (conversion happens automatically).
  3. Replace any calls to human_errors::user(msg, advice) with human_errors::user(msg, &[advice]).
  4. Replace any calls to human_errors::system(msg, advice) with human_errors::system(msg, &[advice]).
  5. Replace any calls to human_errors::user_with_internal(msg, advice, err) with human_errors::wrap_user(err, msg, &[advice]).

... (truncated)

Commits
  • f327cee fix: Ensure we don't return duplicate advice entries
  • 6b8a796 refactor: Change internal name of error wrapper
  • f2cf0ee tweak: Don't run tests during publish
  • f1fa6bc ci: Use latest ubuntu build for releases
  • 7ee16fb Merge pull request #30 from SierraSoftworks/refactor/v2
  • 1d3808b style: Run cargo fmt
  • af5771b style: Resolve some clippy warnings
  • 88a88b6 refactor: Remove unnecessary additional methods for coercing strings into errors
  • d9790e5 style: Run cargo fmt
  • 4898a11 tweak: Bump version to 0.2.x
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [human-errors](https://github.com/SierraSoftworks/human-errors-rs) from 0.1.5 to 0.2.1.
- [Release notes](https://github.com/SierraSoftworks/human-errors-rs/releases)
- [Commits](SierraSoftworks/human-errors-rs@v0.1.5...v0.2.1)

---
updated-dependencies:
- dependency-name: human-errors
  dependency-version: 0.2.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file rust Pull requests that update Rust code labels Dec 4, 2025
Copy link
Member

@notheotherben notheotherben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants