Log error when database settings fail to load
This commit is contained in:
parent
02f21169b4
commit
23f298b8c9
|
|
@ -44,6 +44,9 @@ public class Connection {
|
||||||
getConnection(Databases.DEFAULT, (mapper -> mapper.addMapper(SettingsMapper.class))).thenApply(connection -> {
|
getConnection(Databases.DEFAULT, (mapper -> mapper.addMapper(SettingsMapper.class))).thenApply(connection -> {
|
||||||
connection.runQuery(session -> {
|
connection.runQuery(session -> {
|
||||||
DatabaseSettings loadedSettings = session.getMapper(SettingsMapper.class).getSettings(database.getInternalName());
|
DatabaseSettings loadedSettings = session.getMapper(SettingsMapper.class).getSettings(database.getInternalName());
|
||||||
|
if (loadedSettings == null) {
|
||||||
|
log.error("Failed to load settings for database {}", database.getInternalName());
|
||||||
|
}
|
||||||
settingsFuture.complete(loadedSettings);
|
settingsFuture.complete(loadedSettings);
|
||||||
});
|
});
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user