Added Server Response Error Handling #1011

Merged
ProfessorDey merged 2 commits from patch-1 into master 2019-05-31 20:36:09 +02:00
Showing only changes of commit 8a6cd2db13 - Show all commits

View file

@ -22,7 +22,7 @@ export const makePublishRequestChannel = (fd, isUpdate) => {
xhr.upload.addEventListener('load', onLoad);
// set state change handler
xhr.onreadystatechange = () => {
if (xhr.readyState === 4) {
if (xhr.readyState === XMLHttpRequest.DONE) {
switch (xhr.status) {
case 413:
emitter({error: new Error("Unfortunately it appears this web server " +