-
-
Notifications
You must be signed in to change notification settings - Fork 575
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
Errors not propagating #684
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm submitting a ... (check one with "x")
Current behavior
When setting using
translateService.use(translateService.getBrowserLang()).subscribe
it is impossible to handle errors since there is no error handler defined in the observer inside the service (see ReactiveX/rxjs#2145 for a bug report which explains why this is the case).Expected/desired behavior
The error handler of the subscriber in my code is called so I can reset the language to one of the known/working languages (or (better option) the service handles this internally resetting the current language to either the previous language or the default language).
Reproduction of the problem
If the current behavior is a bug or you can illustrate your feature request better with an example, please provide the steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar. You can use this template as a starting point: http://plnkr.co/edit/tpl:WccVZSBM0rUgq2sXSUbe
http://plnkr.co/edit/lNmVAFcneFm86CwuAagP?p=preview
What is the expected behavior?
Alert is shown because "non_existing_language" can not be loaded
What is the motivation / use case for changing the behavior?
Handling dynamic loading of (future) languages from a server environment instead of only relying on locally available languages.
Please tell us about your environment:
ngx-translate version: 8.0.0
Angular version: 4.3.6
Browser: all
The text was updated successfully, but these errors were encountered: