From 29469bb7c633b389121ccc3ac9502a310f1c3d60 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 22 Jul 2019 10:18:27 +0900 Subject: [PATCH] Better error --- src/server/api/private/signup.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/api/private/signup.ts b/src/server/api/private/signup.ts index b8793582f..d535d4983 100644 --- a/src/server/api/private/signup.ts +++ b/src/server/api/private/signup.ts @@ -117,7 +117,7 @@ export default async (ctx: Koa.BaseContext) => { host: null }); - if (exist) throw 'already registered'; + if (exist) throw new Error(' the username is already used'); account = await transactionalEntityManager.save(new User({ id: genId(),