added a check for 502 response on publish
This commit is contained in:
parent
97eae1a183
commit
09f7ea58ac
1 changed files with 6 additions and 4 deletions
|
@ -123,11 +123,13 @@ const publishFileFunctions = {
|
||||||
xhr.open("POST", uri, true);
|
xhr.open("POST", uri, true);
|
||||||
xhr.onreadystatechange = function() {
|
xhr.onreadystatechange = function() {
|
||||||
if (xhr.readyState == 4) {
|
if (xhr.readyState == 4) {
|
||||||
|
console.log('publish response:', xhr.response)
|
||||||
if (xhr.status == 200) {
|
if (xhr.status == 200) {
|
||||||
console.log('publish complete!');
|
console.log('publish complete!');
|
||||||
that.showFilePublishComplete(JSON.parse(xhr.response).message);
|
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 {
|
} else {
|
||||||
console.log(xhr.response);
|
|
||||||
that.showFilePublishFailure(JSON.parse(xhr.response).message);
|
that.showFilePublishFailure(JSON.parse(xhr.response).message);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue