Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Quick and dirty reaction to rxjs errors
import { OperatorFunction, EMPTY } from 'rxjs';
import { catchError } from 'rxjs/operators';
import { ErrorDisplayService } from './error-display.service';
export function swallowError<T>(): OperatorFunction<T, T> {
return catchError(() => (EMPTY));
export function swallowErrorWithDisplay<T>(eds: ErrorDisplayService): OperatorFunction<T, T> {
return catchError(err => {
return EMPTY;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.