ultimatecourses/ngrx-store-effects-app

Why is switchMap/CatchError needed here?

Opened this issue · 0 comments

wlans commented

https://github.com/UltimateAngular/ngrx-store-effects-app/blob/8e859d1838d89fe833138e0a5a89ae0b0eebad3f/src/products/guards/toppings.guard.ts#L17

On lines 17 and 18 you do a switchMap and catchError. I have been trying to understand why for a while now. This checkStore function is subscribed to the store not the outbound HTTP call so in what case would it throw an error?