fix(frontend): update onError toast error message

This commit is contained in:
yassinedorbozgithub 2025-02-05 15:07:49 +01:00
parent 0a77bc87ac
commit c520fd8f36

View File

@ -65,7 +65,7 @@ export const TranslationForm: FC<ComponentFormProps<ITranslation>> = ({
const { mutate: updateTranslation } = useUpdate(EntityType.TRANSLATION, {
onError: (error: Error) => {
rest.onError?.();
toast.error(error || t("message.internal_server_error"));
toast.error(error.message || t("message.internal_server_error"));
},
onSuccess() {
rest.onSuccess?.();