Skip to content

Commit

Permalink
fix: error code issue solved
Browse files Browse the repository at this point in the history
  • Loading branch information
VishalS99 committed Oct 22, 2020
1 parent 7616742 commit d0877b1
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions public/src/login/login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,22 @@ function Login(props) {
// if (err.status === 500) {
// document.getElementById("login-error-message").innerHTML =
// "Internal Server Error. Please try again later.";
if (
err.status !== 401 ||
err.status !== 400 ||
err.status !== 404 ||
err.status !== 500 ||
err.status !== 503
) {
document.getElementById("login-error-message").innerHTML =
"Service currently unavailable. Please try again later.";

switch (err.response.status) {
case 400:
case 401:
case 404:
case 500:
case 503:
document.getElementById("login-error-message").innerHTML = "";
break;
default:
document.getElementById("login-error-message").innerHTML =
"Service currently unavailable. Please try again later.";
setLoading(false);
break;

}
// if (err.status) setLoading(false);
});
} else {
// alert("Not @nitt");
Expand Down

0 comments on commit d0877b1

Please sign in to comment.