mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
Better error handling
This commit is contained in:
parent
3dde711f41
commit
79ba615bae
1 changed files with 3 additions and 0 deletions
|
@ -24,6 +24,8 @@ class Subscribe extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.context.actions.call(callAction, post._id, (error, result) => {
|
this.context.actions.call(callAction, post._id, (error, result) => {
|
||||||
|
if (error)
|
||||||
|
this.context.messages.flash(error.message, "error")
|
||||||
if (result)
|
if (result)
|
||||||
this.context.events.track(callAction, {'_id': post._id});
|
this.context.events.track(callAction, {'_id': post._id});
|
||||||
})
|
})
|
||||||
|
@ -64,6 +66,7 @@ Subscribe.propTypes = {
|
||||||
|
|
||||||
Subscribe.contextTypes = {
|
Subscribe.contextTypes = {
|
||||||
currentUser: React.PropTypes.object,
|
currentUser: React.PropTypes.object,
|
||||||
|
messages: React.PropTypes.object,
|
||||||
actions: React.PropTypes.object,
|
actions: React.PropTypes.object,
|
||||||
events: React.PropTypes.object,
|
events: React.PropTypes.object,
|
||||||
intl: intlShape
|
intl: intlShape
|
||||||
|
|
Loading…
Add table
Reference in a new issue