Skip to content

Commit

Permalink
Update ObjectProperties.vue
Browse files Browse the repository at this point in the history
Removing error response from being displayed. Adding generic failure message.
  • Loading branch information
SalleeMatthew authored and smile0711 committed Sep 17, 2024
1 parent ee8d814 commit 20f924f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spa/src/pages/ObjectProperties.vue
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,13 @@ methods: {
await this.objectProperties();
this.success = 'Object purchased!';
this.error = '';
} catch(errorResponse: any) {
} catch(e) {
this.success = '';
this.error = errorResponse;
console.log(errorResponse.response.data.error);
this.error = "Purchase failed to process.";
console.log("Purchase Unsuccessful");
}
} else {
this.error = "You don't have enough cc's.";
throw new Error("You don't have enough cc's.");
}
} else {
if(this.walletBalance >= this.price) {
Expand All @@ -275,8 +275,8 @@ methods: {
id: this.objectId});
this.success = 'Object purchased!';
await this.objectProperties();
} catch(error) {
console.log(error);
} catch(e) {
console.log("Purchase Unsuccessful");
}
}
}
Expand Down

0 comments on commit 20f924f

Please sign in to comment.