Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix: improved fallback checking

Piyush Gupta555468eec056
diff --git a/frontend/src/components/auth/EnterEmailStep.tsx b/frontend/src/components/auth/EnterEmailStep.tsx
index 55988818f7..4bdf10dc61 100644
--- a/frontend/src/components/auth/EnterEmailStep.tsx
+++ b/frontend/src/components/auth/EnterEmailStep.tsx
@@ -54,11 +54,10 @@ export default function EnterEmailStep({
incrementStep();
} catch (e) {
if (axios.isAxiosError(e)) {
- let message = "Something went wrong";
- if (e?.status === 422) {
- message = "Invalid email";
- } else {
- message = (e.response?.data as { message: string })?.message || message;
+ let { message } = e.response?.data as { message: string };
+
+ if (typeof message !== "string") {
+ message = "Something went wrong";
}
createNotification({