Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

150
Vistas
Zone.js possibly blocking HttpErrorResponse from being received by HttpInterceptor

I'm having issues getting my HttpInterceptor to work on my application. This is my code:

intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
return next.handle(req)
  .pipe(
    catchError((error: HttpErrorResponse) => {
        if (error instanceof HttpErrorResponse) {
          console.log(error);
          let toast: Toast = {
            header: "",
            body: "",
            details: "",
            pinned: false,
            showDetails: false,
            type: ToastTypes.DANGER,
          };
          switch (error.status) {
            ...
          }
       return throwError(error);
    }))
  )
}

I've tried to use tap() too in my pipe but whenever an error occurs, I only get this on my console:

POST http://localhost:4200/fhir/search 500 (Internal Server Error)
scheduleTask    @   zone-evergreen.js:2845
scheduleTask    @   zone-evergreen.js:385
onScheduleTask  @   zone-evergreen.js:272
scheduleTask    @   zone-evergreen.js:378
scheduleTask    @   zone-evergreen.js:210
scheduleMacroTask   @   zone-evergreen.js:233
scheduleMacroTaskWithCurrentZone    @   zone-evergreen.js:1134
(anonymous) @   zone-evergreen.js:2878
proto.<computed>    @   zone-evergreen.js:1449
...

Additionally, even if I try to handle errors inside subscribe() blocks, the same behaviour happens and my code is ignored.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda