You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When defining subscriptions in the subscriptions field or function there doesn't appear to be a way to attach an error handler to them. I like how convenient it is to just define an observable in these blocks and have Vue subscribe and expose the results to the component, but when subscriptions defined in this manner hit an error condition it breaks the application. Would it be possible to:
Have a way to register an error handler for subscriptions that are created by Vue from this block
If an error handler isn't defined, have vue route errors to the application level exception handler
The text was updated successfully, but these errors were encountered:
For the first one, yes you can use catch as that is what I do now, but it is a bit more work for the cases where you just want to report an error rather than actual turn it into a retry or do some other handling as you have to return another observable from it I believe.
In terms of how best to handle it, not sure a real clean way while still maintaining backwards compatibility with what is there now. One idea would be to provide the option for people to return objects that have separate properties for the observable, onerror, oncomplete properties and then have the subscription handling code use those provided functions if they exist, otherwise assume the current type of object where it should be an observable itself.
When defining subscriptions in the
subscriptions
field or function there doesn't appear to be a way to attach an error handler to them. I like how convenient it is to just define an observable in these blocks and have Vue subscribe and expose the results to the component, but when subscriptions defined in this manner hit an error condition it breaks the application. Would it be possible to:The text was updated successfully, but these errors were encountered: