diff --git a/apps/rxjs-catch-error/src/app/app.component.ts b/apps/rxjs-catch-error/src/app/app.component.ts index c7dfb0f..6974c93 100644 --- a/apps/rxjs-catch-error/src/app/app.component.ts +++ b/apps/rxjs-catch-error/src/app/app.component.ts @@ -38,11 +38,11 @@ export class AppComponent { ngOnInit() { this.submit$$ .pipe( - takeUntilDestroyed(this.destroyRef), map(() => this.input), concatMap((value) => this.http.get(`https://jsonplaceholder.typicode.com/${value}/1`) - ) + ), + takeUntilDestroyed(this.destroyRef) ) .subscribe({ next: (value) => { diff --git a/docs/src/content/docs/challenges/rxjs/38-rxjs-catch-error.md b/docs/src/content/docs/challenges/rxjs/38-rxjs-catch-error.md index cf9edb9..8fd668f 100644 --- a/docs/src/content/docs/challenges/rxjs/38-rxjs-catch-error.md +++ b/docs/src/content/docs/challenges/rxjs/38-rxjs-catch-error.md @@ -1,12 +1,22 @@ --- title: 🟢 catchError -description: Challenge 38 is about learning obervable completion. +description: Challenge 38 is about learning obervable +completion. +Author: Devesh Chaudhari +command: rxjs-catch-error +challengeNumber: 38 sidebar: order: 14 badge: New --- -
Challenge #38
+:::note +WIP: The following documentation will be reviewed and improved. However, you can still take on the challenge. If you don't understand a certain part, please feel free to reach out or create an issue. +::: + +## Information + +--- ## How to Use the Application @@ -22,27 +32,10 @@ A bug has been identified in our application. Users are only able to successfull This application provides an opportunity to understand the correct placement of a `catchError` operator. If placed incorrectly, the overall subscription will be completed, preventing users from sending more requests. The goal is to preserve the overall subscription by handling error notifications from inner observables appropriately. +## Statement + +The goal is to use the catchError operator to handle error management inside your Rxjs stream. + ## Constraints Users should be able to log the value/error each time they click the "Fetch" button. - -:::note -Start the project by running: `npx nx serve rxjs-catch-error`. -::: - -:::tip[Reminder] -Your PR title must start with Answer:38. -::: - -
- - ❖ Community Answers - - - ▶︎ Author Answer - -