diff --git a/src/processes/profile_classifier.rs b/src/processes/profile_classifier.rs index c54c12b..8c3d801 100644 --- a/src/processes/profile_classifier.rs +++ b/src/processes/profile_classifier.rs @@ -1,7 +1,7 @@ use std::sync::Arc; use std::time::Duration; -use anyhow::Result; +use anyhow::{Context, Result}; use log::{error, info}; use crate::services::Bluesky; @@ -56,13 +56,15 @@ impl ProfileClassifier { } async fn fill_in_profile_details(&self, did: &str) -> Result<()> { - let details = self.bluesky.fetch_profile_details(did).await?; + let details = self.bluesky.fetch_profile_details(did).await.context("Could not fetch profile details")?; let country = match details { Some(details) => { self.ai .infer_country_of_living(&details.display_name, &details.description) - .await? + .await + .context("Could not infer country of living") + ? } None => "xx".to_owned(), };