Browse Source

post_object(): return response content in case of an error

master
Fr3deric 7 years ago
parent
commit
fe64dcd52c
  1. 2
      journalmarks/static/journalmarks.js

2
journalmarks/static/journalmarks.js

@ -150,7 +150,7 @@ function post_object(url, data) {
if (req.status == 200) if (req.status == 200)
resolve(JSON.parse(req.response)); resolve(JSON.parse(req.response));
else else
reject(Error(req.statusText)); reject(Error(req.response));
}; };
req.onerror = function() { req.onerror = function() {
reject(Error("Network Error")); reject(Error("Network Error"));

Loading…
Cancel
Save