mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 07:26:45 +00:00
fix: breaking signup page on error
This commit is contained in:
@@ -54,7 +54,13 @@ export default function EnterEmailStep({
|
|||||||
incrementStep();
|
incrementStep();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (axios.isAxiosError(e)) {
|
if (axios.isAxiosError(e)) {
|
||||||
const { message = "Something went wrong" } = e.response?.data as { message: string };
|
let message = "Something went wrong";
|
||||||
|
if (e?.status === 422) {
|
||||||
|
message = "Invalid email";
|
||||||
|
} else {
|
||||||
|
message = (e.response?.data as { message: string })?.message || message;
|
||||||
|
}
|
||||||
|
|
||||||
createNotification({
|
createNotification({
|
||||||
type: "error",
|
type: "error",
|
||||||
text: message
|
text: message
|
||||||
|
|||||||
Reference in New Issue
Block a user