zeroclaw-labs/zeroclaw · error

Failed to query devices

Error message

Failed to query devices

What it means

Error "Failed to query devices" thrown in zeroclaw-labs/zeroclaw.

Source

Thrown at crates/zeroclaw-gateway/src/api_pairing.rs:101

                    .map(|dt| dt.with_timezone(&Utc))
                    .unwrap_or_else(|_| Utc::now());
                let capabilities = capabilities_json
                    .as_deref()
                    .and_then(|s| serde_json::from_str::<Vec<String>>(s).ok());
                Ok((
                    token_hash,
                    DeviceInfo {
                        id,
                        name,
                        device_type,
                        paired_at,
                        last_seen,
                        ip_address,
                        capabilities,
                    },
                ))
            })
            .expect("Failed to query devices");
        for (hash, info) in rows.flatten() {
            cache.insert(hash, info);
        }

        Self {
            cache: Mutex::new(cache),
            db_path,
        }
    }

    #[cfg(test)]
    pub(crate) fn with_db_path(db_path: PathBuf) -> Self {
        Self {
            cache: Mutex::new(HashMap::new()),
            db_path,
        }
    }

View on GitHub (pinned to 88bb9c8533)

Solutions

  1. Check database integrity and retry; restart the gateway if the connection was lost.
  2. Recreate the device registry database if corruption persists.

When it happens

Trigger: Thrown at crates/zeroclaw-gateway/src/api_pairing.rs:101 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23). Data as JSON: /api/errors/50d79641fc5ece2c. Report an issue: GitHub.