Commit a8c68dd0 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

on invalid login the error message is proper

parent 96f2dd1f
......@@ -2037,7 +2037,7 @@ ServerConnector.login = function (login, password) {
self.getSessionData().setLogin(params.login);
return Promise.resolve(self.getSessionData().getToken());
}).catch(function (error) {
if (error instanceof NetworkError && error.statusCode === HttpStatus.FORBIDDEN) {
if (error instanceof NetworkError && (error.statusCode === HttpStatus.FORBIDDEN || error.statusCode === HttpStatus.UNAUTHORIZED)) {
throw new InvalidCredentialsError("Invalid credentials");
} else {
throw error;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment