request.onerror = function(event){ console.error("addPublication error", this.error); // do nothing event.preventDefault(); };