diff --git a/kafka-ui-react-app/src/components/Schemas/Details/LatestVersionItem.tsx b/kafka-ui-react-app/src/components/Schemas/Details/LatestVersionItem.tsx index 70f405af4ee..7a689a99cad 100644 --- a/kafka-ui-react-app/src/components/Schemas/Details/LatestVersionItem.tsx +++ b/kafka-ui-react-app/src/components/Schemas/Details/LatestVersionItem.tsx @@ -33,6 +33,7 @@ const LatestVersionItem: React.FC = ({
= ({ {id} ({ mode: 'onChange' }); @@ -62,15 +62,19 @@ const Edit = ({ compatibilityLevel: CompatibilityLevelCompatibilityEnum; newSchema: string; }) => { - await updateSchema( - schema, - newSchema, - schemaType, - compatibilityLevel, - clusterName, - subject - ); - history.push(clusterSchemaPath(clusterName, subject)); + try { + await updateSchema( + schema, + newSchema, + schemaType, + compatibilityLevel, + clusterName, + subject + ); + history.push(clusterSchemaPath(clusterName, subject)); + } catch (e) { + // do not redirect + } }, [schema, register, control, clusterName, subject, updateSchema, history] ); @@ -96,7 +100,7 @@ const Edit = ({
- {schemasAreFetched && !isSubmitting ? ( + {schemasAreFetched ? (
{Object.keys(SchemaType).map((type: string) => (
- diff --git a/kafka-ui-react-app/src/components/Schemas/Edit/__tests__/__snapshots__/Edit.spec.tsx.snap b/kafka-ui-react-app/src/components/Schemas/Edit/__tests__/__snapshots__/Edit.spec.tsx.snap index d7287b0de3b..a24c37681d0 100644 --- a/kafka-ui-react-app/src/components/Schemas/Edit/__tests__/__snapshots__/Edit.spec.tsx.snap +++ b/kafka-ui-react-app/src/components/Schemas/Edit/__tests__/__snapshots__/Edit.spec.tsx.snap @@ -48,6 +48,7 @@ exports[`Edit Component when schemas are fetched matches the snapshot 1`] = ` >