feat(i18n): first shoot on translated errors

This commit is contained in:
Julien Froidefond
2025-02-27 15:05:44 +01:00
parent 41228e59bc
commit ea51ff53a9
14 changed files with 54 additions and 38 deletions

View File

@@ -2,7 +2,6 @@
import { AuthError } from "@/types/auth";
import { ERROR_CODES } from "@/constants/errorCodes";
import { getErrorMessage } from "@/utils/errors";
class AuthService {
private static instance: AuthService;
@@ -42,7 +41,6 @@ class AuthService {
}
throw {
code: ERROR_CODES.AUTH.INVALID_CREDENTIALS,
message: getErrorMessage(ERROR_CODES.AUTH.INVALID_CREDENTIALS),
} as AuthError;
}
}
@@ -70,7 +68,6 @@ class AuthService {
}
throw {
code: ERROR_CODES.AUTH.INVALID_USER_DATA,
message: getErrorMessage(ERROR_CODES.AUTH.INVALID_USER_DATA),
} as AuthError;
}
}
@@ -94,7 +91,6 @@ class AuthService {
}
throw {
code: ERROR_CODES.AUTH.LOGOUT_ERROR,
message: getErrorMessage(ERROR_CODES.AUTH.LOGOUT_ERROR),
} as AuthError;
}
}