feat: add test for hash when error (#4814)
This commit is contained in:
@ -157,12 +157,7 @@ export const generatePassword = async (length = 24): Promise<string> => {
|
||||
* Used to hash the password.
|
||||
*/
|
||||
export const hash = async (password: string): Promise<string> => {
|
||||
try {
|
||||
return await argon2.hash(password)
|
||||
} catch (error: any) {
|
||||
logger.error(error)
|
||||
return ""
|
||||
}
|
||||
return await argon2.hash(password)
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user