Skip to content

Commit

Permalink
Merge pull request #22458 from nextcloud/fix/weather-status-navigate-…
Browse files Browse the repository at this point in the history
…error

Hide error if a background request fails during navigation
  • Loading branch information
rullzer authored Aug 27, 2020
2 parents aad30d3 + ceffbe9 commit 2c6c5fe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apps/weather_status/js/weather-status.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/weather_status/js/weather-status.js.map

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion apps/weather_status/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,12 @@ export default {
this.startLoop()
}
} catch (err) {
if (err?.code === 'ECONNABORTED') {
console.info('The weather status request was cancelled because the user navigates.')
return
}
showError(t('weather_status', 'There was an error getting the weather status information.'))
console.debug(err)
console.error(err)
}
},
startLoop() {
Expand Down

0 comments on commit 2c6c5fe

Please sign in to comment.