Error Handling
import { NgModule, ErrorHandler } from '@angular/core';
@Injectable()
export class MyErrorHandler implements ErrorHandler {
handleError(error: any) {
console.log('ERROR! ', error);
// Make sure to rethrow the error so Angular can pick it up
throw error;
}
}
@NgModule({
imports: [AppComponent],
providers: [
{
provide: ErrorHandler,
useClass: MyErrorHandler
}
]
})
export class AppModule {}Handling errors within an @Select
@SelectWhy does RxJS unsubscribe on error?
Handling errors within an @Action
@ActionHandling errors after dispatching an action
Last updated

