Arcader7171 commited on
Commit
26a957d
·
verified ·
1 Parent(s): 7984324

Update static/scripts/login.js

Browse files
Files changed (1) hide show
  1. 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
- console.error('Error from server - ', errorData);
 
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)