Various error handling improvements and user feedback

This commit is contained in:
Maxime Dor
2017-10-07 06:15:57 +02:00
parent b4f0645257
commit 3b697e86ac
7 changed files with 83 additions and 9 deletions

View File

@@ -146,8 +146,8 @@ public class OrmLiteSqliteStorage implements IStorage {
return withCatcher(() -> {
List<ThreePidSessionDao> daoList = sessionDao.queryForMatchingArgs(new ThreePidSessionDao(tpid, secret));
if (daoList.size() > 1) {
log.error("Lookup for 3PID Session {}:{} returned more than one result");
throw new InternalServerError();
throw new InternalServerError("Lookup for 3PID Session " +
tpid + " returned more than one result");
}
if (daoList.isEmpty()) {