Skip to content

Commit

Permalink
DSP-777 Show message on all server errors in login component (#200)
Browse files Browse the repository at this point in the history
* fix(action): Add error message to login on server error

* chore(action): Better error message on server error
  • Loading branch information
kilchenmann committed Oct 5, 2020
1 parent e287816 commit 4aac16b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class LoginFormComponent implements OnInit {
forgot_pw: 'Forgot password?',
error: {
failed: 'Password or username is wrong',
server: 'There\'s an error with the server connection. Try it again later or inform the DaSCH team.'
server: 'An error has occurred when connecting to the server. Try again later or contact the DaSCH support.'
}
};

Expand Down Expand Up @@ -159,7 +159,7 @@ export class LoginFormComponent implements OnInit {
// error handling
this.loginErrorUser = (error.status === 404);
this.loginErrorPw = (error.status === 401);
this.loginErrorServer = (error.status === 0);
this.loginErrorServer = (error.status === 0 || error.status >= 500 && error.status < 600);

this.loginSuccess.emit(false);
this.errorMessage = error;
Expand Down

0 comments on commit 4aac16b

Please sign in to comment.