Skip to content
This repository has been archived by the owner on Jun 25, 2021. It is now read-only.

feat: use thiserror for errors #301

Merged
merged 4 commits into from
Dec 28, 2020

Conversation

joshuef
Copy link
Collaborator

@joshuef joshuef commented Dec 28, 2020

No description provided.

@joshuef joshuef requested a review from a team as a code owner December 28, 2020 10:41
src/errors.rs Outdated
pub enum Error {
/// Access is denied for a given requester
/// Access denied for supplied PublicKey
#[error("Access Denied")]
AccessDenied,
Copy link
Member

Choose a reason for hiding this comment

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

Don't we want to provide the pk here so the consumer knows which pk was being used when the error was thrown? I know this is probably out of scope of this PR, but just thinking the direction we should take these errors to and start working on some consistency.

@@ -640,7 +640,7 @@ mod tests {
}

#[test]
fn try_from() -> Result<()> {
fn try_from() -> anyhow::Result<()> {
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps simply use anyhow::{Result, anyhow} for the whole test module?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I did try that and things got wiiild w/ compiler errors. I'll double check that's not sorted now though

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

that wildness is only in the seq file. the rest ill update

@bochaco bochaco merged commit 65e9874 into maidsafe:master Dec 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants