{"record":{"id":"abcb408c0c1935da","repo":"windmill-labs/windmill","slug":"uuid-parse-error","errorCode":null,"errorMessage":"Uuid parse error","messagePattern":"Uuid parse error","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/windmill-worker/src/agent_workers.rs","lineNumber":16,"sourceCode":"use reqwest::header::HeaderMap;\nuse uuid::Uuid;\nuse windmill_common::{\n    agent_workers::QueueInitJob, worker::HttpClient, workspaces::DucklakeWithConnData,\n};\nuse windmill_queue::{JobAndPerms, JobCompleted};\n\npub async fn queue_init_job(client: &HttpClient, content: &str) -> anyhow::Result<Uuid> {\n    client\n        .post(\n            \"/api/agent_workers/queue_init_job\",\n            None,\n            &QueueInitJob { content: content.to_string() },\n        )\n        .await\n        .and_then(|x: String| Uuid::parse_str(&x).map_err(|e| anyhow::anyhow!(e)))\n}\n\npub async fn queue_periodic_job(client: &HttpClient, content: &str) -> anyhow::Result<Uuid> {\n    client\n        .post(\n            \"/api/agent_workers/queue_periodic_job\",\n            None,\n            &QueueInitJob { content: content.to_string() },\n        )\n        .await\n        .and_then(|x: String| Uuid::parse_str(&x).map_err(|e| anyhow::anyhow!(e)))\n}\n\npub async fn pull_job(\n    client: &HttpClient,\n    headers: Option<HeaderMap>,\n    body: Option<bool>,\n) -> anyhow::Result<Option<JobAndPerms>> {","sourceCodeStart":1,"sourceCodeEnd":34,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/backend/windmill-worker/src/agent_workers.rs#L1-L34","documentation":"queue_init_job POSTs to /api/agent_workers/queue_init_job expecting the server to return the new job id as a plain UUID string; parsing the response body with Uuid::parse_str failed. The generic 'Uuid parse error' (via anyhow!(e)) hides the actual body, which usually means the server returned an error page/message instead of a UUID.","triggerScenarios":"The HTTP call returns 2xx but with a non-UUID body (proxy/HTML response), or returns an error and the client still attempts UUID parsing on the error text.","commonSituations":"Agent pointed at a wrong URL behind a proxy that intercepts the request; server returning a JSON error body with a 200, or auth redirect HTML; version mismatch where the endpoint doesn't exist and a router fallback responds.","solutions":["Check the base URL the agent client points at — it must reach the windmill API directly, not a landing page/proxy","Verify auth: unauthenticated requests may get redirect/error bodies","Confirm the target windmill version has the agent_workers queue_init_job endpoint","Log the raw response body on parse failure to see what was actually returned"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"curl -sS -o /dev/null -w '%{http_code}' \"$BASE_URL/api/agent_workers/queue_init_job\"  # expect non-404/non-302\n# ensure BASE_URL is the windmill API root, e.g. https://app.windmill.dev","typeGuard":null,"tryCatchPattern":"let body = client\n    .post(\"/api/agent_workers/queue_init_job\", None, &payload)\n    .await?;\nlet job_id = Uuid::parse_str(&body)\n    .map_err(|e| anyhow!(\"unexpected response body {body:?}: {e}\"))?;","preventionTips":["Point the agent at the API root, not a proxied landing page","Verify token validity before queuing","Log raw response bodies on parse failures","Confirm server version supports agent_workers endpoints"],"tags":["rust","http","uuid","agent-worker"],"backgroundTag":"invalid-uuid-response","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}