Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Handle error from Observable in rxState.connect() #1536

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

Open
valentin78 opened this issue Apr 11, 2023 · 2 comments · May be fixed by #1553
Open

Handle error from Observable in rxState.connect() #1536

valentin78 opened this issue Apr 11, 2023 · 2 comments · May be fixed by #1553
Labels
🐞 Bug Bug: Something isn't working { } State @rx-angular/state related

Comments

@valentin78
Copy link

Description

RxStat.connect() doesn't handle errors from Observable<>

Steps to Reproduce the Issue

a$ = of(null).pipe(
  switchMap(() => throw new Error('error'))
);
somestate.connect(a$);

ErrorHandler will not call in this case

RxState 2.0.0

@edbzn edbzn added 🐞 Bug Bug: Something isn't working { } State @rx-angular/state related labels Apr 17, 2023
@valentin78
Copy link
Author

added this shortcut to catch error, log and display on UI notification
pipe(catchError(err => this.catchError(err)))
image
but after first catching subscription is dead
do you have any idea how to fix it ?

@valentin78
Copy link
Author

4 months elapsed since I posted this issue, that actually blocks using this cool library on production
luckily angular got feature like Signals with effects & computed functions, that allows already migrate to it
thank you guys for some ideas and your time to support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug Bug: Something isn't working { } State @rx-angular/state related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants