使用catchError方法
this.authService.refreshToken() .pipe( switchMap(() => {...}), catchError((e) => { // handle e and return a safe value or re-throw if (isCritical(e)) { return throwError(e); } return of([]); }) );