From 9231bd0d4a1528e7c9b99342faed139e33397d73 Mon Sep 17 00:00:00 2001 From: Polianin Nikita Date: Wed, 9 Oct 2024 03:11:09 +0300 Subject: [PATCH] fix: set the text based on the context --- src/pages/login/login.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/login/login.component.ts b/src/pages/login/login.component.ts index aab3260..677a2f9 100644 --- a/src/pages/login/login.component.ts +++ b/src/pages/login/login.component.ts @@ -82,7 +82,7 @@ export class LoginComponent { }) .pipe(catchError(error => { this.loaderActive = false; - this.errorText = error.error; + this.errorText = error.error instanceof String ? error.error : error.statusText; this.loginButtonIsDisable = true; throw error; }))