forked from jsnbuchanan/crowd-funder-for-time-pwa
Added error handling and new alerts in DiscoverView
This commit is contained in:
@@ -186,6 +186,16 @@ export default class DiscoverView extends Vue {
|
||||
|
||||
if (response.status !== 200) {
|
||||
const details = await response.text();
|
||||
this.$notify(
|
||||
{
|
||||
group: "alert",
|
||||
type: "danger",
|
||||
title: "Danger Alert",
|
||||
text: details,
|
||||
},
|
||||
-1,
|
||||
);
|
||||
|
||||
throw details;
|
||||
}
|
||||
|
||||
@@ -240,6 +250,16 @@ export default class DiscoverView extends Vue {
|
||||
);
|
||||
|
||||
if (response.status !== 200) {
|
||||
const details = await response.text();
|
||||
this.$notify(
|
||||
{
|
||||
group: "alert",
|
||||
type: "danger",
|
||||
title: "Danger Alert",
|
||||
text: details,
|
||||
},
|
||||
-1,
|
||||
);
|
||||
throw await response.text();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user