{"record":{"id":"cc0e7328d42eebde","repo":"tonhowtf/omniget","slug":"operacao-desconhecida","errorCode":null,"errorMessage":"operacao {} desconhecida","messagePattern":"operacao (.+?) desconhecida","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/tools/x/client.rs","lineNumber":366,"sourceCode":"\n    pub async fn gql_get(\n        &self,\n        op: &str,\n        variables: Value,\n        extra_features: Value,\n        field_toggles: Option<Value>,\n    ) -> anyhow::Result<Value> {\n        let mut features = base_features();\n        if let (Some(base), Some(extra)) = (features.as_object_mut(), extra_features.as_object()) {\n            for (k, v) in extra {\n                base.insert(k.clone(), v.clone());\n            }\n        }\n        let mut tries = 0;\n        loop {\n            tries += 1;\n            let id = super::query_ids::id_for(op)\n                .ok_or_else(|| anyhow!(\"operacao {} desconhecida\", op))?;\n            let (url, path) = self.gql_url(&id, op);\n            let mut query: Vec<(&str, String)> = vec![\n                (\"variables\", variables.to_string()),\n                (\"features\", features.to_string()),\n            ];\n            if let Some(ft) = &field_toggles {\n                query.push((\"fieldToggles\", ft.to_string()));\n            }\n            let headers = self.headers(\"GET\", &path).await?;\n            let resp = self\n                .http\n                .get(&url)\n                .headers(headers)\n                .query(&query)\n                .send()\n                .await?;\n            match Self::check(resp, op).await? {\n                Ok(v) => return Ok(v),","sourceCodeStart":348,"sourceCodeEnd":384,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/x/client.rs#L348-L384","documentation":"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'.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\nlet v = client.gql_get(\"UserTweetsAndReplis\", vars, feats, None).await?;\n// after\nlet v = client.gql_get(\"UserTweetsAndReplies\", vars, feats, None).await?;","handlingStrategy":"validation","validationCode":"// Rust: check the op is resolvable before calling\nif super::query_ids::id_for(op).is_none() {\n    return Err(anyhow!(\"op {} not registered; refresh query ids first\", op));\n}","typeGuard":null,"tryCatchPattern":"match client.gql_get(op, vars, feats, None).await {\n    Err(e) if e.to_string().contains(\"desconhecida\") => {\n        // refresh the manifest once, then fail loudly if still unknown\n        client.refresh_ids().await?;\n        client.gql_get(op, vars, feats, None).await\n    }\n    r => r,\n}","preventionTips":["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"],"tags":["x","graphql","unknown-operation","lookup-failed"],"backgroundTag":"unsupported-operation","analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}