Skip to content

Commit

Permalink
fix(api): Add API timeout catch blocks.
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronmussig committed Feb 15, 2023
1 parent 51f2f24 commit c9c9322
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/search/IsSurveillanceGenome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ export default Vue.extend({
this.isSurveillance = response.data.isNcbiSurveillance;
this.surveyAccession = response.data.accession;
})
.catch((err) => {
this.$accessor.api.defaultCatch(err);
})
.finally(() => {
this.loading = false;
});
Expand Down
3 changes: 3 additions & 0 deletions components/search/ResultsFromPreviousReleases.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ export default Vue.extend({
this.$api.taxon.getPreviousReleases(searchTaxon).then(response => {
this.rows = response.data
})
.catch((err) => {
this.$accessor.api.defaultCatch(err);
})
.finally(() => {
this.loading = false;
});
Expand Down
3 changes: 3 additions & 0 deletions pages/about.vue
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,10 @@ export default Vue.extend({
// @ts-ignore
this.$api.meta.version().then((resp) => {
this.apiVersion = `${resp.data.major}.${resp.data.minor}.${resp.data.patch}`
}) .catch((err: any) => {
this.$accessor.api.defaultCatch(err);
})
},
},
mounted() {
Expand Down
3 changes: 3 additions & 0 deletions pages/searches.vue
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,9 @@ export default Vue.extend({
this.totalRows = response.data.totalRows
this.rows = response.data.rows
})
.catch((err) => {
this.$accessor.api.defaultCatch(err);
})
.finally(() => {
this.loading = false;
Expand Down

0 comments on commit c9c9322

Please sign in to comment.