mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-10 12:28:56 +00:00
fix: application crash on zod api error
This commit is contained in:
@@ -63,7 +63,6 @@ export const IdentityClientSecretModal = ({ popUp, handlePopUpToggle }: Props) =
|
|||||||
};
|
};
|
||||||
|
|
||||||
const onFormSubmit = async ({ description, ttl, numUsesLimit }: FormData) => {
|
const onFormSubmit = async ({ description, ttl, numUsesLimit }: FormData) => {
|
||||||
try {
|
|
||||||
const { clientSecret } = await createClientSecret({
|
const { clientSecret } = await createClientSecret({
|
||||||
identityId: popUpData.identityId,
|
identityId: popUpData.identityId,
|
||||||
description,
|
description,
|
||||||
@@ -79,16 +78,6 @@ export const IdentityClientSecretModal = ({ popUp, handlePopUpToggle }: Props) =
|
|||||||
});
|
});
|
||||||
|
|
||||||
reset();
|
reset();
|
||||||
} catch (err) {
|
|
||||||
console.error(err);
|
|
||||||
const error = err as any;
|
|
||||||
const text = error?.response?.data?.message ?? "Failed to create client secret";
|
|
||||||
|
|
||||||
createNotification({
|
|
||||||
text,
|
|
||||||
type: "error"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user