Skip to content

Instantly share code, notes, and snippets.

@armanozak
Created May 3, 2021 09:22
Show Gist options
  • Save armanozak/3d758dcced1467f556acd24b6b12a22d to your computer and use it in GitHub Desktop.
Save armanozak/3d758dcced1467f556acd24b6b12a22d to your computer and use it in GitHub Desktop.
[What's New in RxJS 7] RxJS 7 config.onUnhandledError #blog #rxjs
import { config, throwError } from "rxjs";
config.onUnhandledError = console.warn;
throwError(() => "TEST ERROR 1").subscribe();
throwError(() => "TEST ERROR 2").subscribe({ error: console.warn });
// (synchronously) TEST ERROR 2
// (asynchronously) TEST ERROR 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment