Skip to content

Instantly share code, notes, and snippets.

@ssougnez

ssougnez/wamr-96.ts

Created Mar 13, 2021
Embed
What would you like to do?
import { Observable, throwError } from 'rxjs';
import { catchError } from 'rxjs/operators';
observable
.pipe(
catchError(err => {
console.warn('I want to display this error globally');
return throwError(err);
})
)
.subscribe({
next: x => console.log(`${x} received`),
complete: () => console.log('Completed'),
error: err => console.warn(err)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment