tonhowtf/omniget · error
operacao desconhecida
Error message
operacao {} desconhecida What it means
gql_get could not resolve a queryId hash for the requested GraphQL operation name: super::query_ids::id_for(op) returned None, meaning the op is not registered in the local query-id cache/manifest. The client refuses to guess a hash and fails fast with 'operacao {} desconhecida'.
Solutions
- Check the op name spelling against the registered names in super::query_ids
- Trigger a refresh of the query ids (refresh_ids / query_ids::refresh) and retry
- Add the operation's queryId to the query_ids registry/manifest
- If the endpoint no longer exists upstream, switch the caller to a supported op
Example fix
// before
let v = client.gql_get("UserTweetsAndReplis", vars, feats, None).await?;
// after
let v = client.gql_get("UserTweetsAndReplies", vars, feats, None).await?; Defensive patterns
Strategy: validation
Validate before calling
// Rust: check the op is resolvable before calling
if super::query_ids::id_for(op).is_none() {
return Err(anyhow!("op {} not registered; refresh query ids first", op));
} Try / catch
match client.gql_get(op, vars, feats, None).await {
Err(e) if e.to_string().contains("desconhecida") => {
// refresh the manifest once, then fail loudly if still unknown
client.refresh_ids().await?;
client.gql_get(op, vars, feats, None).await
}
r => r,
} Prevention
- Register every new op name in query_ids when adding client methods
- Keep an up-to-date query-ids manifest; refresh on first run
- Validate op names against the registry in unit tests
- Avoid hand-typed op strings — define them as constants
When it happens
Trigger: Calling gql_get with an operation string that is not in the static registry nor in the refreshed query-ids manifest — e.g. a typo like 'UserByScreenname', a brand-new X endpoint never added to query_ids, or a cache file that was never populated.
Common situations: First run before any query-id refresh produced a manifest; a new op was added to client code but not to query_ids; query-id scrape failed silently leaving an empty cache; op renamed upstream.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- X
- Grok: nao consegui abrir uma conversa
- ERR_TOO_MANY_ATTACHMENTS
- HLS nao e suportado neste navegador
- refresh returned no audio format
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/cc0e7328d42eebde.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/tools/x/client.rs:366
pub async fn gql_get(
&self,
op: &str,
variables: Value,
extra_features: Value,
field_toggles: Option<Value>,
) -> anyhow::Result<Value> {
let mut features = base_features();
if let (Some(base), Some(extra)) = (features.as_object_mut(), extra_features.as_object()) {
for (k, v) in extra {
base.insert(k.clone(), v.clone());
}
}
let mut tries = 0;
loop {
tries += 1;
let id = super::query_ids::id_for(op)
.ok_or_else(|| anyhow!("operacao {} desconhecida", op))?;
let (url, path) = self.gql_url(&id, op);
let mut query: Vec<(&str, String)> = vec![
("variables", variables.to_string()),
("features", features.to_string()),
];
if let Some(ft) = &field_toggles {
query.push(("fieldToggles", ft.to_string()));
}
let headers = self.headers("GET", &path).await?;
let resp = self
.http
.get(&url)
.headers(headers)
.query(&query)
.send()
.await?;
match Self::check(resp, op).await? {
Ok(v) => return Ok(v),View on GitHub (pinned to 8600b91f42)