Skip to content

Commit 178019b

Browse files
committed
Auto merge of #3146 - JohnTitor:no-longer-login, r=Turbo87
Remove outdated information about GitHub permission error https://crates.io/login is no longer valid (found in rust-lang/cargo#9000 (comment)) and it's just enough to recommend re-authentication now, I think.
2 parents 677dd0f + ee3f009 commit 178019b

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/github.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,23 @@ where
2727
.header(header::USER_AGENT, "crates.io (https://crates.io)")
2828
.send()?
2929
.error_for_status()
30-
.map_err(|e| handle_error_response(app, &e))?
30+
.map_err(|e| handle_error_response(&e))?
3131
.json()
3232
.map_err(Into::into)
3333
}
3434

35-
fn handle_error_response(app: &App, error: &reqwest::Error) -> Box<dyn AppError> {
35+
fn handle_error_response(error: &reqwest::Error) -> Box<dyn AppError> {
3636
use reqwest::StatusCode as Status;
3737

3838
match error.status() {
39-
Some(Status::UNAUTHORIZED) | Some(Status::FORBIDDEN) => cargo_err(&format!(
39+
Some(Status::UNAUTHORIZED) | Some(Status::FORBIDDEN) => cargo_err(
4040
"It looks like you don't have permission \
41-
to query a necessary property from Github \
41+
to query a necessary property from GitHub \
4242
to complete this request. \
4343
You may need to re-authenticate on \
4444
crates.io to grant permission to read \
45-
github org memberships. Just go to \
46-
https://{}/login",
47-
app.config.domain_name,
48-
)),
45+
GitHub org memberships.",
46+
),
4947
Some(Status::NOT_FOUND) => not_found(),
5048
_ => internal(&format_args!(
5149
"didn't get a 200 result from github: {}",

0 commit comments

Comments
 (0)