Skip to content

Commit

Permalink
Fixed saving providers issue
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Nov 2, 2021
1 parent 0bfaa29 commit d6e9d3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ui/src/app/metadata/editor/MetadataEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export function MetadataEditor ({ restore, current, reload }) {
.then(() => {
gotoDetail({ refresh: true });
})
.catch((err) => {
notificationDispatch(createNotificationAction(`Updated data with latest changes`, NotificationTypes.INFO))
.catch((err, notification) => {
notificationDispatch(notification || createNotificationAction(`${err.errorCode} - ${translator(err.errorMessage)}`, NotificationTypes.ERROR));
});
};

Expand Down
3 changes: 2 additions & 1 deletion ui/src/app/metadata/hooks/api.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import useFetch from 'use-http';

import API_BASE_PATH from '../../App.constant';
import { createNotificationAction, NotificationTypes } from '../../notifications/hoc/Notifications';
import { useContentionDispatcher, openContentionModalAction } from '../contention/ContentionContext';

import {MetadataFilterTypes} from '../domain/filter';
Expand Down Expand Up @@ -113,7 +114,7 @@ export function useMetadataUpdater (path, current, cancel) {
resolve(await update(p, resolution));
}, (err) => {
cancel && cancel();
reject(err);
reject(err, createNotificationAction(`Updated data with latest changes`, NotificationTypes.INFO));
}));
});
}
Expand Down

0 comments on commit d6e9d3e

Please sign in to comment.