throw exception if no instance for session

This commit is contained in:
sk
2023-05-29 13:31:42 +02:00
parent 7849c34d1f
commit 32081b71f5
2 changed files with 6 additions and 7 deletions

View File

@@ -463,7 +463,12 @@ public class AccountSessionManager{
}
public Instance getInstanceInfo(String domain){
return instances.get(domain);
Instance instance = instances.get(domain);
if (instance == null) {
throw new IllegalStateException("Cannot get instance for " + domain + ". Sessions: "
+ String.join(", ", instances.keySet()));
}
return instance;
}
public void updateAccountInfo(String id, Account account){