ErrorHandler in Nativescript - Help


#1

Hello,
I am implementing an ErrorHandler to control my requests to my api, but when I create it and registered it in the app.module does not detect me. I was reading that nativescript pulls an ErrorHandler by default, as I do to create a custom ErrorHandler for my requests. Greetings and thanks.

   handleError(errorResponse: HttpErrorResponse | any) {

        super.handleError(errorResponse);
    

        if (errorResponse instanceof Response) {

          console.log("ERROR DE HANDLER: ", errorResponse);
          
          
    
        }
    
      }

      goToLogin(): void {
        const router = this.injector.get(Router);
        router.navigate(['./prueba']);
      }

}```

#2

Not sure, but this GitHub issue might help?