🐛 Better error prompt. Fixes #283

This commit is contained in:
Liyas Thomas
2019-11-08 00:28:58 +05:30
parent 2a9adfd180
commit c537477d3a

View File

@@ -763,7 +763,7 @@ export default {
responseText && responseText &&
this.response.body !== "(waiting to send request)" && this.response.body !== "(waiting to send request)" &&
this.response.body !== "Loading..." && this.response.body !== "Loading..." &&
this.response.body !== "See JavaScript console (F12) for details." this.response.body.indexOf("console") == -1
) { ) {
responseText.innerText = responseText.innerText =
this.responseType === "application/json" || this.responseType === "application/json" ||
@@ -1375,14 +1375,14 @@ export default {
return; return;
} else { } else {
this.response.status = error.message; this.response.status = error.message;
this.response.body = "See JavaScript console (F12) for details."; this.response.body = error + "\nCheck console for details.";
this.$toast.error(error + " (F12 for details)", { this.$toast.error(error + " (F12 for details)", {
icon: "error" icon: "error"
}); });
if (!this.$store.state.postwoman.settings.PROXY_ENABLED) { if (!this.$store.state.postwoman.settings.PROXY_ENABLED) {
this.$toast.info("Try enabling Proxy", { this.$toast.info("Try enabling Proxy", {
icon: "help", icon: "help",
duration: 5000, duration: 8000,
action: { action: {
text: "Settings", text: "Settings",
onClick: (e, toastObject) => { onClick: (e, toastObject) => {