Spaces:
Sleeping
Sleeping
Update static/scripts/login.js
Browse files- static/scripts/login.js +2 -1
static/scripts/login.js
CHANGED
|
@@ -20,7 +20,8 @@ function login() {
|
|
| 20 |
if (errorResponse instanceof Response) {
|
| 21 |
errorResponse.json()
|
| 22 |
.then(errorData => {
|
| 23 |
-
|
|
|
|
| 24 |
})
|
| 25 |
.catch(jsonParseError => {
|
| 26 |
console.error("Error parsing error from server", jsonParseError)
|
|
|
|
| 20 |
if (errorResponse instanceof Response) {
|
| 21 |
errorResponse.json()
|
| 22 |
.then(errorData => {
|
| 23 |
+
const parsedErrorData = JSON.parse(errorData)
|
| 24 |
+
console.error('Error from server - ', parsedErrorData.message);
|
| 25 |
})
|
| 26 |
.catch(jsonParseError => {
|
| 27 |
console.error("Error parsing error from server", jsonParseError)
|