diff --git a/src/portal/lib/src/shared/shared.utils.ts b/src/portal/lib/src/shared/shared.utils.ts index 1b2e889d0..895c7815e 100644 --- a/src/portal/lib/src/shared/shared.utils.ts +++ b/src/portal/lib/src/shared/shared.utils.ts @@ -31,6 +31,9 @@ export const errorHandler = function (error: any): string { if (error.error && error.error.message) { return error.error.message; } + if (error.message) { + return error.message; + } if (!(error.statusCode || error.status)) { // treat as string message diff --git a/src/portal/src/app/log/audit-log.component.ts b/src/portal/src/app/log/audit-log.component.ts index 5469b95ab..b7b411813 100644 --- a/src/portal/src/app/log/audit-log.component.ts +++ b/src/portal/src/app/log/audit-log.component.ts @@ -104,7 +104,6 @@ export class AuditLogComponent implements OnInit { this.auditLogs = response.body; }, error => { - this.router.navigate(['/harbor', 'projects']); this.messageHandlerService.handleError(error); } ); diff --git a/src/portal/src/app/project/member/member.component.ts b/src/portal/src/app/project/member/member.component.ts index 879280d90..0526b9049 100644 --- a/src/portal/src/app/project/member/member.component.ts +++ b/src/portal/src/app/project/member/member.component.ts @@ -129,15 +129,16 @@ export class MemberComponent implements OnInit, OnDestroy { this.selectedRow = []; this.memberService .listMembers(projectId, username).pipe( - finalize(() => this.loading = false)) + finalize(() => { + this.loading = false; + let hnd = setInterval(() => this.ref.markForCheck(), 100); + setTimeout(() => clearInterval(hnd), 1000); + })) .subscribe( response => { this.members = response; - let hnd = setInterval(() => this.ref.markForCheck(), 100); - setTimeout(() => clearInterval(hnd), 1000); }, error => { - this.router.navigate(["/harbor", "projects"]); this.messageHandlerService.handleError(error); }); }