fix: config file parse errors not reported as missing DATABASE_URL
This commit is contained in:
@@ -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"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user