diff --git a/src/providers/apns.rs b/src/providers/apns.rs index 38753b80..312d76ba 100644 --- a/src/providers/apns.rs +++ b/src/providers/apns.rs @@ -175,6 +175,10 @@ impl PushProvider for ApnsProvider { ); Err(Error::ApnsCertificateUnknownCA) } + dbg if dbg.contains("received fatal alert: CertificateExpired") => { + info!("APNs certificate expired: debug:{dbg}, display: {client_error}"); + Err(Error::ApnsCertificateExpired) + } _ => Err(Error::Apns(e)), } } diff --git a/src/state.rs b/src/state.rs index 8949fc47..a33f1b5c 100644 --- a/src/state.rs +++ b/src/state.rs @@ -79,11 +79,7 @@ pub fn new_state( #[cfg(feature = "multitenant")] let jwt_secret = config.jwt_secret.clone(); - let public_ip = match networking::find_public_ip_addr() { - Ok(ip) => Some(ip), - // Note: Should we pass this error back up? - Err(_e) => None, - }; + let public_ip = networking::find_public_ip_addr().ok(); Ok(AppState { config: config.clone(),