Skip to content

Commit 6f81f42

Browse files
Silence non-rust team not found errors
1 parent 448f923 commit 6f81f42

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/handlers/notification.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,14 @@ async fn id_from_user(
151151
let team = match github::get_team(&ctx.github, team).await {
152152
Ok(Some(team)) => team,
153153
Ok(None) => {
154-
log::error!("team ping ({}) failed to resolve to a known team", login);
154+
// If the team is in rust-lang*, then this is probably an error (potentially user
155+
// error, but should be investigated). Otherwise it's probably not going to be in
156+
// the team repository so isn't actually an error.
157+
if login.starts_with("rust") {
158+
log::error!("team ping ({}) failed to resolve to a known team", login);
159+
} else {
160+
log::info!("team ping ({}) failed to resolve to a known team", login);
161+
}
155162
return Ok(None);
156163
}
157164
Err(err) => {

0 commit comments

Comments
 (0)