Skip to content

Commit 336b4af

Browse files
authored
fix(console): display error toast for sso connector creation (#7945)
1 parent 3341a6d commit 336b4af

File tree

1 file changed

+3
-1
lines changed
  • packages/console/src/pages/EnterpriseSso/SsoCreationModal

1 file changed

+3
-1
lines changed

packages/console/src/pages/EnterpriseSso/SsoCreationModal/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function SsoCreationModal({ isOpen, onClose: rawOnClose }: Props) {
7777
setError,
7878
watch,
7979
} = useForm<FormType>({ resetOptions: { keepErrors: true } });
80-
const api = useApi({ hideErrorToast: true });
80+
const api = useApi({ hideErrorToast: [duplicateConnectorNameErrorCode] });
8181

8282
const isLoading = !data && !error;
8383

@@ -126,7 +126,9 @@ function SsoCreationModal({ isOpen, onClose: rawOnClose }: Props) {
126126
if (metadata.code === duplicateConnectorNameErrorCode) {
127127
setError('connectorName', { type: 'custom', message: metadata.message });
128128
}
129+
return;
129130
}
131+
throw error;
130132
}
131133
})
132134
);

0 commit comments

Comments
 (0)