From 92edbcf576bc7506bd404b0bdefa657194094821 Mon Sep 17 00:00:00 2001 From: Jelani Harris Date: Wed, 15 May 2019 18:07:15 -0500 Subject: [PATCH] Fixed parseServerErrorResponse for auth-store by properly passing a false if it couldn't find a special error message. --- src/module/authentication/store/auth-store.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/module/authentication/store/auth-store.ts b/src/module/authentication/store/auth-store.ts index 7a728a9..b20ae84 100644 --- a/src/module/authentication/store/auth-store.ts +++ b/src/module/authentication/store/auth-store.ts @@ -227,10 +227,11 @@ export class AuthStore { }, method: "POST", }); + this.clearAll(); return true; } catch (error) { - // If we weren't able to handle the error, then indicate that something unexpected + // If we weren't able to handle the error, then indicate that something unexpected happened if (!this.handleError(error)) { this.updateErrorField("emailError", "An unknown error occurred resetting email."); } @@ -261,7 +262,9 @@ export class AuthStore { return true; } catch (error) { - this.handleError(error); + if (!this.handleError(error)) { + this.updateErrorField("passwordError", "Log in failed."); + } return false; } } @@ -358,8 +361,6 @@ export class AuthStore { parsedError = true; break; default: - this.updateErrorField("passwordError", "Log in failed."); - parsedError = true; break; } }