{"record":{"id":"e9e6379d1f15d9ae","repo":"nikivdev/code","slug":"personal-env-vars-not-found","errorCode":null,"errorMessage":"Personal env vars not found.","messagePattern":"Personal env vars not found\\.","errorType":"http","errorClass":"anyhow::Error","httpStatus":404,"severity":"warning","filePath":"src/env.rs","lineNumber":3271,"sourceCode":"        EnvTarget::Personal { space } => {\n            let mut url = Url::parse(&format!(\"{}/api/env/personal\", api_url))?;\n            url.query_pairs_mut()\n                .append_pair(\"environment\", environment);\n            if let Some(space) = space {\n                url.query_pairs_mut().append_pair(\"space\", space);\n            }\n            let resp = client\n                .get(url)\n                .header(\"Authorization\", format!(\"Bearer {}\", token))\n                .send()\n                .context(\"failed to connect to cloud\")?;\n\n            if resp.status() == 401 {\n                bail!(\"Unauthorized. Check your token with `f env login`.\");\n            }\n\n            if resp.status() == 404 {\n                bail!(\"Personal env vars not found.\");\n            }\n\n            if !resp.status().is_success() {\n                let status = resp.status();\n                let body = resp.text().unwrap_or_default();\n                bail!(\"API error {}: {}\", status, body);\n            }\n\n            let data: PersonalEnvResponse = resp.json().context(\"failed to parse response\")?;\n            (data.env, None, \"cloud\")\n        }\n        EnvTarget::Project { name } => {\n            let entries =\n                fetch_project_cloud_env_entries(name, environment, &[], &api_url, token, &client)?;\n            (entries.vars, Some(entries.descriptions), \"cloud (sealed)\")\n        }\n    };\n","sourceCodeStart":3253,"sourceCodeEnd":3289,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/env.rs#L3253-L3289","documentation":"Raised when the personal-env API returns HTTP 404, meaning no personal env vars exist for the authenticated user/project at the requested target. The library interprets a 404 as 'nothing configured yet' rather than a transport failure, so it bails with this concise message.","triggerScenarios":"GET to the personal-env endpoint returns 404 — typically the first time a user queries personal env vars before ever setting one, or after the vars were deleted server-side; also a wrong project/slug in the request URL that doesn't correspond to an existing resource.","commonSituations":"Fresh account with no personal env vars set yet; env vars deleted by a teammate or via the web UI; querying an environment/scope name that doesn't exist.","solutions":["Set at least one personal env var first (e.g. via the set personal env var command) then re-run the read","Verify the project/environment name in the request matches an existing one","Check the cloud dashboard to confirm the env vars exist and for which scope"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"match fetch_personal_envs() {\n    Err(e) if e.to_string().contains(\"not found\") => {\n        eprintln!(\"No personal env vars yet; using empty set.\");\n        Ok(HashMap::new())\n    }\n    Err(e) => return Err(e),\n    Ok(v) => v,\n}","preventionTips":["Set at least one personal env var before running read/list commands","Confirm the project/environment name exists before querying","Handle 404-as-empty as the normal first-run experience in scripts","Verify vars in the cloud dashboard if reads unexpectedly 404"],"tags":["http-404","env","cloud","not-found"],"backgroundTag":"resource-not-found-404","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}