LemmyNet/lemmy · error

err getting activity: {e:?}

Error message

err getting activity: {e:?}

What it means

Context-wrapping error in local_site_data_cached: assembling the cached LocalSiteData (local site plus instance allowlist/blocklist) failed with cause `e`. It fires when SiteView::read_local, Instance::allowlist, or Instance::blocklist database queries error inside the try_get_with cache block; the message surfaces that underlying failure.

Source

Thrown at crates/apub/objects/src/utils/functions.rs:100

    Box::pin(CACHE
      .try_get_with((), async {
        let (local_site, allowed_instances, blocked_instances) =
          lemmy_diesel_utils::try_join_with_pool!(pool => (
            // LocalSite may be missing
            |pool| async {
              Ok(SiteView::read_local(pool).await.ok().map(|s| s.local_site))
            },
            Instance::allowlist,
            Instance::blocklist
          ))?;

        Ok::<_, LemmyError>(Arc::new(LocalSiteData {
          local_site,
          allowed_instances,
          blocked_instances,
        }))
      }))
      .await.map_err(|e| anyhow::anyhow!("err getting activity: {e:?}"))?
  )
}

pub async fn check_apub_id_valid_with_strictness(
  apub_id: &Url,
  is_strict: bool,
  context: &LemmyContext,
) -> LemmyResult<()> {
  let domain = apub_id
    .domain()
    .ok_or(UntranslatedError::UrlWithoutDomain)?
    .to_string();
  let local_instance = context.settings().get_hostname_without_port()?;
  if domain == local_instance {
    return Ok(());
  }

  let local_site_data = local_site_data_cached(&mut context.pool()).await?;

View on GitHub (pinned to 439734dd63)

Solutions

  1. Inspect the wrapped cause `e` (typically a database error on local site or instance list reads).
  2. Verify database connectivity and the local_site / instance tables are intact.
  3. Retry after fixing the DB issue; the cache will rebuild on the next successful call.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at crates/apub/objects/src/utils/functions.rs:100 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of LemmyNet/lemmy@439734dd63 (2026-09-06). Data as JSON: /api/errors/1785ee51ee2e91fc. Report an issue: GitHub.