{"record":{"id":"3cb4e3e9209bd553","repo":"zed-industries/zed","slug":"error-loading-config","errorCode":null,"errorMessage":"error loading config","messagePattern":"error loading config","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/collab/src/main.rs","lineNumber":56,"sourceCode":"        );\n    }\n\n    let mut args = args().skip(1);\n    match args.next().as_deref() {\n        Some(\"version\") => {\n            println!(\"collab v{} ({})\", VERSION, REVISION.unwrap_or(\"unknown\"));\n        }\n        Some(\"serve\") => {\n            let mode = match args.next().as_deref() {\n                Some(\"collab\") => ServiceMode::Collab,\n                Some(\"api\") => ServiceMode::Api,\n                Some(\"all\") => ServiceMode::All,\n                _ => {\n                    return Err(anyhow!(\"usage: collab <version | serve <api|collab|all>>\"))?;\n                }\n            };\n\n            let config = envy::from_env::<Config>().expect(\"error loading config\");\n            init_tracing(&config);\n            init_panic_hook();\n\n            let mut app = Router::new()\n                .route(\"/\", get(handle_root))\n                .route(\"/healthz\", get(handle_liveness_probe))\n                .layer(Extension(mode));\n\n            let listener = TcpListener::bind(format!(\"0.0.0.0:{}\", config.http_port))\n                .expect(\"failed to bind TCP listener\");\n\n            let mut on_shutdown = None;\n\n            if mode.is_collab() || mode.is_api() {\n                setup_app_database(&config).await?;\n\n                let state = AppState::new(config, Executor::Production).await?;\n","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/collab/src/main.rs#L38-L74","documentation":"Startup failure in the collab server binary: parsing the configuration from environment variables via envy::from_env::<Config>() panicked (expect \"error loading config\"), meaning a required env var is missing or has the wrong type. The server cannot start with an invalid configuration.","triggerScenarios":"Thrown at crates/collab/src/main.rs:56 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set all required COLLAB_* environment variables before starting the server","Check that env values have the expected types (numbers, bools, URLs)","Compare against the Config struct's field definitions for required keys"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9d272b036335401f339d024ea94968fd51016c40","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}