Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Add toast notification to handle errors when updating a destination (#…
Browse files Browse the repository at this point in the history
…232)

(cherry picked from commit a2f990c)
  • Loading branch information
Tianli Feng committed Feb 5, 2021
1 parent 64bda02 commit 2c03474
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ class CreateDestination extends React.Component {
params: { destinationId },
},
history,
notifications,
} = this.props;
const { ifSeqNo, ifPrimaryTerm } = this.state;
try {
Expand All @@ -124,6 +125,7 @@ class CreateDestination extends React.Component {
if (resp.ok) {
history.push(`/destinations`);
} else {
backendErrorNotification(notifications, 'update', 'destination', resp.resp);
// Handles stale Destination data.
setSubmitting(false);
this.getDestination(destinationId);
Expand Down

0 comments on commit 2c03474

Please sign in to comment.