Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

149
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda