Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(errors): improve displaying of errors #322

Closed
wants to merge 3 commits into from

Conversation

simonsan
Copy link
Contributor

@simonsan simonsan commented Oct 8, 2024

Fixes #231

@simonsan simonsan added A-errors Area: error handling needs improvement A-dx Area: Related to Developer Experience C-refactor Category: Refactoring of already existing code labels Oct 8, 2024
FromParseError(#[from] shell_words::ParseError),
}

/// [`CryptoErrorKind`] describes the errors that can happen while dealing with Cryptographic functions
#[derive(Error, Debug, Display, Copy, Clone)]
pub enum CryptoErrorKind {
/// data decryption failed
/// data decryption failed: `{0:?}`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The underlying error was not shown to the user, so this ended in a simple: data decryption failed. Which is not really helpful. The hope is, that aead:Error is a bit more helpful here.

Copy link

codecov bot commented Oct 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.8%. Comparing base (b5fda12) to head (f6819a2).

Additional details and impacted files
Files with missing lines Coverage Δ
crates/core/src/error.rs 71.4% <ø> (+14.2%) ⬆️

... and 18 files with indirect coverage changes

@simonsan simonsan requested a review from aawsome October 8, 2024 05:20
@simonsan simonsan added the S-waiting-for-review Status: PRs waiting for review label Oct 8, 2024
@simonsan simonsan added this to the NEXT milestone Oct 8, 2024
github-merge-queue bot pushed a commit that referenced this pull request Oct 9, 2024
@simonsan
Copy link
Contributor Author

simonsan commented Oct 9, 2024

Was merged with #323

@simonsan simonsan closed this Oct 9, 2024
@simonsan simonsan deleted the refactor/error-display branch October 9, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-dx Area: Related to Developer Experience A-errors Area: error handling needs improvement C-refactor Category: Refactoring of already existing code S-waiting-for-review Status: PRs waiting for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error: data decryption failed
1 participant