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

$href action - request for error callback #353

Open
hanyg opened this issue Sep 15, 2018 · 2 comments
Open

$href action - request for error callback #353

hanyg opened this issue Sep 15, 2018 · 2 comments

Comments

@hanyg
Copy link

hanyg commented Sep 15, 2018

Hello,

I am using the $href action on the main view of my application. While testing with network connectivity off I noticed that href does not support an error callback if it can't reach the URL. In my case, I just want a simple way of handling the connectivity issue by displaying an alert or something similar. What actually happens is my customized error.json is brought into view. So, my application is not crashing, but it would be preferable to explicitly handle it vs. a global error handler.

Would an error callback on an $href action be something that could be easily added?

Thanks,
Hany

@darenr
Copy link
Contributor

darenr commented Sep 18, 2018

I think there's two types of error, the one caught by the app at the top level isn't the same as an http error. I've seen $href's trigger local error callbacks, but switching the phone to airplane mode triggers the app-level callback json.

@hanyg
Copy link
Author

hanyg commented Sep 20, 2018

Thanks for the feedback. I’ve never been able to get $href to trigger an error callback. The success works with $ok. But based on the documentation I didn’t think that was supported. I’m using the general error handler for now. Maybe in the future there will be a more specific way to handle the error.

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

No branches or pull requests

2 participants