How to use the @nationalbankbelgium/stark-core.StarkErrorHandlingActionTypes.UNHANDLED_ERROR function in @nationalbankbelgium/stark-core

To help you get started, we’ve selected a few @nationalbankbelgium/stark-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NationalBankBelgium / stark / showcase / src / app / shared / effects / stark-error-handling.effects.ts View on Github external
public starkUnhandledError$(): Observable {
		return this.actions$.pipe(
			ofType(StarkErrorHandlingActionTypes.UNHANDLED_ERROR),
			map((action: StarkUnhandledError) => {
				this.zone.run(() => {
					this.toastNotificationService
						.show({
							id: uniqueId(),
							type: StarkMessageType.ERROR,
							key: action.error.toString(),
							code: "Unhandled error - no code"
						})
						.subscribe();
				});
			})
		);
	}