Skip to content

Commit

Permalink
log error
Browse files Browse the repository at this point in the history
  • Loading branch information
dmstern committed Nov 26, 2018
1 parent 98e83be commit a9607b4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,10 @@ export default class App extends Vue {
EventBus.$on(Errors.SERVER_ERROR, (error) => {
const res = error.response;
this.error.show = true;
this.error.msg = res.data;
console.log(error);
if (res) {
this.error.msg = res.data;
}
});
EventBus.$on(Events.TRIGGER_FILTER_SEARCH, (args: { filters: Searchable[], query: string }) => {
Expand Down Expand Up @@ -584,3 +587,4 @@ code.hljs {
color: $color-gray-medium;
}
</style>
9 changes: 6 additions & 3 deletions src/components/LoadingSpinner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,12 @@ export default class LoadingSpinner extends Vue {
EventBus.$on(Errors.SERVER_ERROR, (error) => {
const res = error.response;
this.error.show = true;
this.error.msg = res.data;
this.error.status = res.status;
this.error.statusText = res.statusText;
console.log(error);
if (res) {
this.error.msg = res.data;
this.error.status = res.status;
this.error.statusText = res.statusText;
}
});
}
}
Expand Down

0 comments on commit a9607b4

Please sign in to comment.