I jailbroke the language learning app that sucked
johnelmlabs.com2 pointsby JohnCurran0 comments
http$
.pipe(
map(res => res['payload']),
catchError(err => {
console.log('caught mapping error and rethrowing', err);
return throwError(err);
}),
finalize(() => console.log("first finalize() block executed")),
catchError(err => {
console.log('caught rethrown error, providing fallback value');
return of([]);
}),
finalize(() => console.log("second finalize() block executed"))
)
.subscribe(
res => console.log('HTTP response', res),
err => console.log('HTTP Error', err),
() => console.log('HTTP request completed.')
);
Once you see the output it begins to finally make sense but intuitive it is not
This is good advice and I agree with it. I just wish it wasn’t the advice we had to give