Skip to content
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

App.on('error') Not Fired #14

Closed
blupu opened this issue Jul 24, 2014 · 2 comments
Closed

App.on('error') Not Fired #14

blupu opened this issue Jul 24, 2014 · 2 comments
Assignees

Comments

@blupu
Copy link
Collaborator

blupu commented Jul 24, 2014

When network is not available or retrieving data from WS fails, refresh:end event if triggered. At the moment, we don't have the required feedback to know if the call has worked or not.

Apparently App.on('erroe') is never fired.

@mleroi
Copy link
Collaborator

mleroi commented Jul 25, 2014

I added a "result" param to the App.on('refresh:end') callback, that can now be used to handle connexion errors, with something like :

App.on('refresh:end',function(result){
    if ( result.ok ) {
        showMessage("Content updated successfully :)");
    }else{
        showMessage(result.message);
    }
});

I updated the bootstrap and nihao themes to handle this.
Details about this result object are documented in app/core/theme-app.js::themeApp.refresh()

@mleroi mleroi assigned blupu and unassigned mleroi Jul 25, 2014
@blupu
Copy link
Collaborator Author

blupu commented Jul 29, 2014

I close the issue unless you want to check why on error is not raised?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants