From ee3f009b005bca3f81a42787f8e2bf00788cba0d Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Wed, 30 Dec 2020 21:55:52 +0900 Subject: [PATCH] Remove outdated information about GitHub permission error --- src/github.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/github.rs b/src/github.rs index 88ceb2fe02..924a5c0fe0 100644 --- a/src/github.rs +++ b/src/github.rs @@ -27,25 +27,23 @@ where .header(header::USER_AGENT, "crates.io (https://crates.io)") .send()? .error_for_status() - .map_err(|e| handle_error_response(app, &e))? + .map_err(|e| handle_error_response(&e))? .json() .map_err(Into::into) } -fn handle_error_response(app: &App, error: &reqwest::Error) -> Box { +fn handle_error_response(error: &reqwest::Error) -> Box { use reqwest::StatusCode as Status; match error.status() { - Some(Status::UNAUTHORIZED) | Some(Status::FORBIDDEN) => cargo_err(&format!( + Some(Status::UNAUTHORIZED) | Some(Status::FORBIDDEN) => cargo_err( "It looks like you don't have permission \ - to query a necessary property from Github \ + to query a necessary property from GitHub \ to complete this request. \ You may need to re-authenticate on \ crates.io to grant permission to read \ - github org memberships. Just go to \ - https://{}/login", - app.config.domain_name, - )), + GitHub org memberships.", + ), Some(Status::NOT_FOUND) => not_found(), _ => internal(&format_args!( "didn't get a 200 result from github: {}",