diff --git a/public/assets/js/publishFileFunctions.js b/public/assets/js/publishFileFunctions.js index 1f552bb8..15a4c5a9 100644 --- a/public/assets/js/publishFileFunctions.js +++ b/public/assets/js/publishFileFunctions.js @@ -123,12 +123,14 @@ const publishFileFunctions = { xhr.open("POST", uri, true); xhr.onreadystatechange = function() { if (xhr.readyState == 4) { + console.log('publish response:', xhr.response) if (xhr.status == 200) { - console.log('publish complete!'); - that.showFilePublishComplete(JSON.parse(xhr.response).message); + console.log('publish complete!'); + that.showFilePublishComplete(JSON.parse(xhr.response).message); + } else if (xhr.status == 502){ + that.showFilePublishFailure('Spee.ch was not able to get a response from the LBRY network.'); } else { - console.log(xhr.response); - that.showFilePublishFailure(JSON.parse(xhr.response).message); + that.showFilePublishFailure(JSON.parse(xhr.response).message); } } else { console.log('xhr.readyState', xhr.readyState, 'xhr.status', xhr.status);