Additional logging

This commit is contained in:
cd-bitwarden 2024-04-25 12:12:14 -04:00
parent 3f944846a4
commit c817903b10
2 changed files with 6 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import { ActivatedRoute, Router } from "@angular/router";
import { combineLatest, Subject, switchMap, takeUntil, catchError } from "rxjs";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
import { DialogService } from "@bitwarden/components";
@ -38,6 +39,7 @@ export class ProjectPeopleComponent implements OnInit, OnDestroy {
}),
),
catchError(async () => {
this.logService.info("Error fetching project people access policies.");
await this.router.navigate(["/sm", this.organizationId, "projects"]);
return undefined;
}),
@ -70,6 +72,7 @@ export class ProjectPeopleComponent implements OnInit, OnDestroy {
private platformUtilsService: PlatformUtilsService,
private i18nService: I18nService,
private accessPolicySelectorService: AccessPolicySelectorService,
private logService: LogService,
) {}
ngOnInit(): void {

View File

@ -4,6 +4,7 @@ import { ActivatedRoute, Router } from "@angular/router";
import { catchError, combineLatest, Subject, switchMap, takeUntil } from "rxjs";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
import { DialogService } from "@bitwarden/components";
@ -41,6 +42,7 @@ export class ServiceAccountPeopleComponent implements OnInit, OnDestroy {
}),
),
catchError(async () => {
this.logService.info("Error fetching service account people access policies.");
await this.router.navigate(["/sm", this.organizationId, "machine-accounts"]);
return undefined;
}),
@ -74,6 +76,7 @@ export class ServiceAccountPeopleComponent implements OnInit, OnDestroy {
private platformUtilsService: PlatformUtilsService,
private i18nService: I18nService,
private accessPolicySelectorService: AccessPolicySelectorService,
private logService: LogService,
) {}
ngOnInit(): void {