-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error handler does not get triggered for ajax calls #709
Comments
@hrushi53 could you also post the code for your action of class applicationActions {
withdrawApplicationSuccess(data) {
return data; // Implicit dispatch
}
withdrawApplicationFailure(error) {
return (dispatch) => dispatch(error); // Explicit dispatch
}
} Not sure if this will resolve your issue, but worth a shot. |
application_actions.es6
application_source.es6
application_store.es6
I am calling this from my react component, like this
|
@hrushi53 I believe // application_actions.es6
class ApplicationActions {
constructor() {
this.generateActions( 'withdrawApplicationSuccess');
}
withdrawApplicationFailure(error) {
return (dispatch) => dispatch(error); // Explicit dispatch
}
}
var applicationActions = alt.createActions(ApplicationActions); Try it out and let me know if that helps. |
Add same issue in one of my app returning the explicit dispatch did the trick,
Thanks! |
Whenever /somepath returns a 200 it is handled by the success handler 'withdrawApplicationSuccess' but a non-200 (for ex 500 or 404), is not handled by error handler 'withdrawApplicationFailure'.
Note We are using jquery 1.11. So I am assuming the $.ajax returns a Promise.
Is there anything wrong with this?
The text was updated successfully, but these errors were encountered: