Angular request duplicate if error is throw

Discussão em 'Angular' iniciado por Nathan30, Abril 29, 2025.

  1. Nathan30

    Nathan30 Guest

    I have a weird behavior with my requests. If the request throw an error, I automatically get a second one launched

    [​IMG]

    Here is an example of my request :

    this.http.post(environment['url'] + '/ws/verifier/documents/list', {}, {headers}).pipe(
    tap((data: any) => {
    ....
    }),
    finalize(() => {
    ....
    }),
    catchError((err: any) => {
    console.debug(err);
    this.notify.handleErrors(err);
    return of(false);
    })
    ).subscribe();


    How can I do to avoid this duplicated request if an error is thrown ?

    Thanks

    Continue reading...

Compartilhe esta Página