Make config saving error messages more verbose

pull/10616/head
deniz kusefoglu 2018-02-05 16:04:30 -08:00
parent c71c4ac648
commit 93f96a72f3
1 changed files with 3 additions and 2 deletions

View File

@ -85,10 +85,11 @@ class AlertTabs extends Component {
text: `Alert configuration for ${section} successfully saved.`,
})
return true
} catch (error) {
} catch ({data: {error}}) {
const errorMsg = _.join(_.drop(_.split(error, ': '), 2), ': ')
this.props.addFlashMessage({
type: 'error',
text: `There was an error saving the alert configuration for ${section}.`,
text: `There was an error saving the alert configuration for ${section}. ${errorMsg}`,
})
return false
}