Better error

This commit is contained in:
syuilo 2019-07-22 10:18:27 +09:00
parent 05dade03b7
commit 3a3d1297e0

View File

@ -117,7 +117,7 @@ export default async (ctx: Koa.BaseContext) => {
host: null host: null
}); });
if (exist) throw 'already registered'; if (exist) throw new Error(' the username is already used');
account = await transactionalEntityManager.save(new User({ account = await transactionalEntityManager.save(new User({
id: genId(), id: genId(),