More useful error message when the config version does not match

This commit is contained in:
Neil Alexander 2022-01-05 15:21:09 +00:00
parent 91e7a82e61
commit abbbbbb2b4
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -421,7 +421,11 @@ func (config *Dendrite) check(_ bool) error { // monolithic
if config.Version != Version {
configErrs.Add(fmt.Sprintf(
"unknown config version %q, expected %q", config.Version, Version,
"config version is %q, expected %q - this means that the format of the configuration "+
"file has changed in some significant way, so please revisit the sample config "+
"and ensure you are not missing any important options that may have been added "+
"or changed recently!",
config.Version, Version,
))
return configErrs
}