Throw errors when failing to create user
This commit is contained in:
@@ -26,6 +26,7 @@ class UserRepository {
|
|||||||
if (error.name === 'AssertionError' || error.message.endsWith('user_name')) {
|
if (error.name === 'AssertionError' || error.message.endsWith('user_name')) {
|
||||||
throw new Error('That username is already registered');
|
throw new Error('That username is already registered');
|
||||||
}
|
}
|
||||||
|
throw Error(error)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user