Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 2, 2026

Migrates from human-errors v0.1.5 to v0.2.2, adopting the new error handling API following the pattern established in github-backup#453.

API Changes

  • Removed: error_shim!() macro
  • Replaced error construction:
    • errors::user_with_internal()ResultExt::wrap_err_as_user()
    • errors::system_with_internal()ResultExt::wrap_err_as_system()
    • errors::user()human_errors::user()
  • Error display: Added human_errors::pretty() for formatted output

Migration Pattern

Before:

std::fs::read_to_string(source).map_err(|e| {
    crate::errors::user_with_internal(
        "Failed to read your configuration file.",
        "Make sure that the file exists and you have permission to access it.",
        e,
    )
})?

After:

use human_errors::ResultExt;

std::fs::read_to_string(source).wrap_err_as_user(
    "Failed to read your configuration file.",
    &["Make sure that the file exists and you have permission to access it."],
)?

Dependencies

  • Enabled pretty feature for enhanced error formatting
  • Updated error messages from &str to String (via format!())
  • Changed advice parameters from single strings to &[&str] arrays

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: notheotherben <1760260+notheotherben@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 2, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/SierraSoftworks/github-backup/pulls/453/files
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Bump human-errors from 0.1.5 to 0.2.2 build(deps): Migrate to human-errors v0.2.2 Jan 2, 2026
Copilot AI requested a review from notheotherben January 2, 2026 21:32
@notheotherben notheotherben marked this pull request as ready for review January 2, 2026 21:57
@notheotherben notheotherben merged commit fc304b5 into dependabot/cargo/human-errors-0.2.2 Jan 2, 2026
18 checks passed
@notheotherben notheotherben deleted the copilot/sub-pr-53 branch January 2, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants