diff --git a/autoendpoint/src/extractors/subscription.rs b/autoendpoint/src/extractors/subscription.rs index 8d29831a2..91901969f 100644 --- a/autoendpoint/src/extractors/subscription.rs +++ b/autoendpoint/src/extractors/subscription.rs @@ -84,7 +84,9 @@ impl FromRequest for Subscription { .fernet .decrypt(&repad_base64(&token_info.token)) .map_err(|e| { - error!("🔐 fernet: {:?}", e); + // Since we're decrypting and endpoint, we get a lot of spam links. + // This can fill our logs. + trace!("🔐 fernet: {:?}", e); ApiErrorKind::InvalidToken })?; @@ -336,7 +338,11 @@ fn validate_vapid_jwt( }; if domain != &aud { - error!("Bad Aud: I am <{:?}>, asked for <{:?}> ", domain, aud); + info!( + "Bad Aud: I am <{:?}>, asked for <{:?}> ", + domain.as_str(), + token_data.claims.aud + ); metrics.clone().incr("notification.auth.bad_vapid.domain"); return Err(VapidError::InvalidAudience.into()); } diff --git a/autoendpoint/src/routers/common.rs b/autoendpoint/src/routers/common.rs index f3ac70cf3..3917d6d38 100644 --- a/autoendpoint/src/routers/common.rs +++ b/autoendpoint/src/routers/common.rs @@ -69,7 +69,8 @@ pub async fn handle_error( ); } RouterError::RequestTimeout => { - warn!("Bridge timeout"); + // Bridge timeouts are common. + info!("Bridge timeout"); incr_error_metric( metrics, platform, @@ -116,6 +117,17 @@ pub async fn handle_error( error.errno(), ); } + RouterError::TooMuchData(_) => { + // Do not log this error since it's fairly common. + incr_error_metric( + metrics, + platform, + app_id, + "too_much_data", + error.status(), + error.errno(), + ); + } _ => { warn!("Unknown error while sending bridge request: {}", error); incr_error_metric(