diff --git a/ee/tabby-webserver/src/service/background_job/third_party_integration/error.rs b/ee/tabby-webserver/src/service/background_job/third_party_integration/error.rs index dd8d993a48dc..b695a8cc9eb5 100644 --- a/ee/tabby-webserver/src/service/background_job/third_party_integration/error.rs +++ b/ee/tabby-webserver/src/service/background_job/third_party_integration/error.rs @@ -6,6 +6,11 @@ pub fn octocrab_error_message(err: octocrab::Error) -> String { format!("GitHub error: {} {}", source.status_code, source.message) } + // no need to print the Json error backtrace + octocrab::Error::Json { source, .. } => { + format!("Json error: {}", source) + } + // the other errors have impl Display or Debug _ => err.to_string(), } diff --git a/ee/tabby-webserver/src/service/background_job/third_party_integration/pulls.rs b/ee/tabby-webserver/src/service/background_job/third_party_integration/pulls.rs index 08302b46ba09..37a66a62fe90 100644 --- a/ee/tabby-webserver/src/service/background_job/third_party_integration/pulls.rs +++ b/ee/tabby-webserver/src/service/background_job/third_party_integration/pulls.rs @@ -58,7 +58,7 @@ pub async fn list_github_pulls( profile.email } Err(e) => { - debug!("Failed to fetch user profile for {}: {}", author, e); + debug!("Failed to fetch user profile for {}: {}", author, octocrab_error_message(e)); None } }