Throw errors when failing to create user

This commit is contained in:
2019-07-26 21:54:13 +02:00
parent 3b27af1f83
commit 23f9911237

View File

@@ -26,6 +26,7 @@ class UserRepository {
if (error.name === 'AssertionError' || error.message.endsWith('user_name')) {
throw new Error('That username is already registered');
}
throw Error(error)
});
}