Show error if debug log upload fails
This commit is contained in:
parent
4ca674edb2
commit
2ef2235317
3 changed files with 31 additions and 11 deletions
|
@ -55,16 +55,25 @@
|
|||
this.$('.buttons, textarea').remove();
|
||||
this.$('.result').addClass('loading');
|
||||
|
||||
const publishedLogURL = await window.log.publish(text);
|
||||
const view = new Whisper.DebugLogLinkView({
|
||||
url: publishedLogURL,
|
||||
el: this.$('.result'),
|
||||
});
|
||||
this.$('.loading').removeClass('loading');
|
||||
view.render();
|
||||
this.$('.link')
|
||||
.focus()
|
||||
.select();
|
||||
try {
|
||||
const publishedLogURL = await window.log.publish(text);
|
||||
const view = new Whisper.DebugLogLinkView({
|
||||
url: publishedLogURL,
|
||||
el: this.$('.result'),
|
||||
});
|
||||
this.$('.loading').removeClass('loading');
|
||||
view.render();
|
||||
this.$('.link')
|
||||
.focus()
|
||||
.select();
|
||||
} catch (error) {
|
||||
console.log(
|
||||
'DebugLogView error:',
|
||||
error && error.stack ? error.stack : error
|
||||
);
|
||||
this.$('.loading').removeClass('loading');
|
||||
this.$('.result').text(i18n('debugLogError'));
|
||||
}
|
||||
},
|
||||
});
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue