From e0b202292b2d91182aa0c795e1ac67076a855d7d Mon Sep 17 00:00:00 2001 From: Ryan Mathis Date: Mon, 25 Oct 2021 11:20:28 -0700 Subject: [PATCH] Revert "Fixed error message on timeout" This reverts commit 7d792b2090489b54a4772e1d574f47b5b33dfa6b. --- .../src/main/resources/i18n/messages.properties | 1 - ui/src/app/metadata/view/MetadataWizard.js | 14 +++----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/backend/src/main/resources/i18n/messages.properties b/backend/src/main/resources/i18n/messages.properties index 632916239..4c22a97ff 100644 --- a/backend/src/main/resources/i18n/messages.properties +++ b/backend/src/main/resources/i18n/messages.properties @@ -597,7 +597,6 @@ message.invalid-signing=Unless the response or the assertions are signed, SAML s message.session-timeout-heading=Session timed out message.session-timeout-body=Your session has timed out. Please login again. -message.session-timeout=An error has occurred while saving. Your session may have timed out. tooltip.entity-id=Entity ID tooltip.service-provider-name=Service Provider Name (Dashboard Display Only) diff --git a/ui/src/app/metadata/view/MetadataWizard.js b/ui/src/app/metadata/view/MetadataWizard.js index 6ba534ffd..4a4b4b5c7 100644 --- a/ui/src/app/metadata/view/MetadataWizard.js +++ b/ui/src/app/metadata/view/MetadataWizard.js @@ -7,12 +7,10 @@ import { Wizard } from '../wizard/Wizard'; import { useMetadataEntity } from '../hooks/api'; import { createNotificationAction, NotificationTypes, useNotificationDispatcher } from '../../notifications/hoc/Notifications'; import { Prompt, useHistory } from 'react-router'; -import { useTranslator } from '../../i18n/hooks'; export function MetadataWizard ({type, data, onCallback}) { const history = useHistory(); - const translator = useTranslator(); const { post, loading, response } = useMetadataEntity(type === 'source' ? 'source' : 'provider'); @@ -21,21 +19,15 @@ export function MetadataWizard ({type, data, onCallback}) { const [blocking, setBlocking] = React.useState(false); async function save(metadata) { + console.log(metadata); await post('', metadata); if (response.ok) { setBlocking(false); history.push(`/dashboard/metadata/manager/${type === 'source' ? 'resolvers' : 'providers'}`); } else { - let msg; - if (response.status) { - const { errorCode, errorMessage, cause } = response.data; - msg = `${errorCode}: ${errorMessage} ${cause ? `-${cause}` : ''}`; - } else { - msg = translator('message.session-timeout'); - } - + const { errorCode, errorMessage, cause } = response.data; notificationDispatch(createNotificationAction( - msg, + `${errorCode}: ${errorMessage} ${cause ? `-${cause}` : ''}`, NotificationTypes.ERROR )); }