mirror of
https://github.com/XRPLF/clio.git
synced 2026-06-09 11:46:44 +00:00
feat: Validate unexpected config values (#2457)
This commit is contained in:
@@ -237,6 +237,12 @@ ClioConfigDefinition::parse(ConfigFileInterface const& config)
|
||||
});
|
||||
}
|
||||
|
||||
for (auto const& key : config.getAllKeys()) {
|
||||
if (!map_.contains(key) && !arrayPrefixesToKeysMap.contains(key)) {
|
||||
listOfErrors.emplace_back("Unknown key: " + key);
|
||||
}
|
||||
}
|
||||
|
||||
if (!listOfErrors.empty())
|
||||
return listOfErrors;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user