mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
removed extra whitespace from error message
This commit is contained in:
@@ -153,7 +153,7 @@ export const authLoginServiceFactory = ({
|
|||||||
username: email
|
username: email
|
||||||
});
|
});
|
||||||
if (!userEnc || (userEnc && !userEnc.isAccepted)) {
|
if (!userEnc || (userEnc && !userEnc.isAccepted)) {
|
||||||
throw new Error("Failed to find user");
|
throw new Error("Failed to find user");
|
||||||
}
|
}
|
||||||
if (!userEnc.authMethods?.includes(AuthMethod.EMAIL)) {
|
if (!userEnc.authMethods?.includes(AuthMethod.EMAIL)) {
|
||||||
validateProviderAuthToken(providerAuthToken as string, email);
|
validateProviderAuthToken(providerAuthToken as string, email);
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ export const authPaswordServiceFactory = ({
|
|||||||
}: TCreateBackupPrivateKeyDTO) => {
|
}: TCreateBackupPrivateKeyDTO) => {
|
||||||
const userEnc = await userDAL.findUserEncKeyByUserId(userId);
|
const userEnc = await userDAL.findUserEncKeyByUserId(userId);
|
||||||
if (!userEnc || (userEnc && !userEnc.isAccepted)) {
|
if (!userEnc || (userEnc && !userEnc.isAccepted)) {
|
||||||
throw new Error("Failed to find user");
|
throw new Error("Failed to find user");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!userEnc.clientPublicKey || !userEnc.serverPrivateKey) throw new Error("failed to create backup key");
|
if (!userEnc.clientPublicKey || !userEnc.serverPrivateKey) throw new Error("failed to create backup key");
|
||||||
@@ -239,7 +239,7 @@ export const authPaswordServiceFactory = ({
|
|||||||
const getBackupPrivateKeyOfUser = async (userId: string) => {
|
const getBackupPrivateKeyOfUser = async (userId: string) => {
|
||||||
const user = await userDAL.findUserEncKeyByUserId(userId);
|
const user = await userDAL.findUserEncKeyByUserId(userId);
|
||||||
if (!user || (user && !user.isAccepted)) {
|
if (!user || (user && !user.isAccepted)) {
|
||||||
throw new Error("Failed to find user");
|
throw new Error("Failed to find user");
|
||||||
}
|
}
|
||||||
const backupKey = await authDAL.getBackupPrivateKeyByUserId(userId);
|
const backupKey = await authDAL.getBackupPrivateKeyByUserId(userId);
|
||||||
if (!backupKey) throw new Error("Failed to find user backup key");
|
if (!backupKey) throw new Error("Failed to find user backup key");
|
||||||
|
|||||||
Reference in New Issue
Block a user