Skip to content

Commit

Permalink
tweak: Resolve flake check issues
Browse files Browse the repository at this point in the history
  • Loading branch information
notheotherben committed Jul 14, 2024
1 parent 1bdb4d5 commit 31066dc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
4 changes: 0 additions & 4 deletions deny.toml

This file was deleted.

2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@
# Audit licenses
github-backup-deny = craneLib.cargoDeny {
inherit src;

cargoDenyChecks = "bans sources";
};

# Run tests with cargo-nextest
Expand Down
12 changes: 10 additions & 2 deletions src/sources/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use tracing::instrument;

use crate::{
config::Config,
errors,
errors::{self, ResponseError},
policy::{BackupPolicy, RepoFilter},
BackupEntity, RepositorySource,
};
Expand Down Expand Up @@ -146,7 +146,15 @@ impl GitHubSource {
"Make sure that your GitHub token is valid and has not expired.",
))
} else {
Err(resp.into())
let err = ResponseError::with_body(resp).await;
Err(errors::user_with_internal(
&format!(
"The GitHub API returned an error response with status code {}.",
err.status_code
),
"Please check the error message below and try again.",
err,
))
}
}
}
Expand Down

0 comments on commit 31066dc

Please sign in to comment.