From 6ef7e813fe99f22aa4e350040f93d8ffdfe999ae Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Tue, 13 Oct 2020 10:02:30 +0300 Subject: [PATCH] UI: Added catch error get OAuth2 --- ui-ngx/src/app/core/auth/auth.service.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ui-ngx/src/app/core/auth/auth.service.ts b/ui-ngx/src/app/core/auth/auth.service.ts index da41c7c1b1..1f8788d821 100644 --- a/ui-ngx/src/app/core/auth/auth.service.ts +++ b/ui-ngx/src/app/core/auth/auth.service.ts @@ -201,10 +201,11 @@ export class AuthService { public loadOAuth2Clients(): Observable> { return this.http.post>(`/api/noauth/oauth2Clients`, null, defaultHttpOptions()).pipe( - tap((OAuth2Clients) => { - this.oauth2Clients = OAuth2Clients; - }) - ); + catchError(err => of([])), + tap((OAuth2Clients) => { + this.oauth2Clients = OAuth2Clients; + }) + ); } private forceDefaultPlace(authState?: AuthState, path?: string, params?: any): boolean {