|
@ -23,6 +23,8 @@ import ms from 'ms'; |
|
|
import { Observable, throwError } from 'rxjs'; |
|
|
import { Observable, throwError } from 'rxjs'; |
|
|
import { catchError, tap } from 'rxjs/operators'; |
|
|
import { catchError, tap } from 'rxjs/operators'; |
|
|
|
|
|
|
|
|
|
|
|
import { paths } from './paths'; |
|
|
|
|
|
|
|
|
@Injectable() |
|
|
@Injectable() |
|
|
export class HttpResponseInterceptor implements HttpInterceptor { |
|
|
export class HttpResponseInterceptor implements HttpInterceptor { |
|
|
public info: InfoItem; |
|
|
public info: InfoItem; |
|
@ -74,7 +76,7 @@ export class HttpResponseInterceptor implements HttpInterceptor { |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
this.snackBarRef.onAction().subscribe(() => { |
|
|
this.snackBarRef.onAction().subscribe(() => { |
|
|
this.router.navigate(['/' + $localize`pricing`]); |
|
|
this.router.navigate(['/' + paths.pricing]); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} else if (error.status === StatusCodes.INTERNAL_SERVER_ERROR) { |
|
|
} else if (error.status === StatusCodes.INTERNAL_SERVER_ERROR) { |
|
@ -110,7 +112,7 @@ export class HttpResponseInterceptor implements HttpInterceptor { |
|
|
} else if (error.status === StatusCodes.UNAUTHORIZED) { |
|
|
} else if (error.status === StatusCodes.UNAUTHORIZED) { |
|
|
if (!error.url.includes('/data-providers/ghostfolio/status')) { |
|
|
if (!error.url.includes('/data-providers/ghostfolio/status')) { |
|
|
if (this.webAuthnService.isEnabled()) { |
|
|
if (this.webAuthnService.isEnabled()) { |
|
|
this.router.navigate(['/webauthn']); |
|
|
this.router.navigate(['/' + paths.webauthn]); |
|
|
} else { |
|
|
} else { |
|
|
this.tokenStorageService.signOut(); |
|
|
this.tokenStorageService.signOut(); |
|
|
} |
|
|
} |
|
|