[DSC-287] invalidate root endpoint cache when redirected to 500 page in order to check every time the rest server availability

This commit is contained in:
Giuseppe Digilio
2021-12-14 12:42:24 +01:00
parent b6904a4df9
commit ddcb1ecdf2
2 changed files with 8 additions and 0 deletions

View File

@@ -32,6 +32,7 @@ export class ServerCheckGuard implements CanActivate {
map((res: RemoteData<any>) => res.hasSucceeded),
tap((hasSucceeded: boolean) => {
if (!hasSucceeded) {
this.rootDataService.invalidateRootCache();
this.router.navigateByUrl(getPageInternalServerErrorRoute());
}
}),