mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
fix: improved fallback checking
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user