fix: config file parse errors not reported as missing DATABASE_URL

This commit is contained in:
2026-10-25 21:02:35 +01:00
parent 8bdf55cfe1
commit 1f724bb064
4 changed files with 16 additions and 50 deletions

View File

@@ -98,6 +98,9 @@ pub fn load() -> Result<AppConfig, ConfigError> {
let figment = Figment::new().merge(Toml::file(path)).merge(LegacyEnv);
figment
.data()
.map_err(|e| ConfigError::Unreadable(Box::new(e)))?;
if figment.find_value("database.url").is_err() {
return Err(ConfigError::Missing("DATABASE_URL"));
}