Skip to content

Commit afbc2d5

Browse files
authored
Merge pull request #24826 from nextcloud/backport/24824/stable20
[stable20] Catch the error on heartbeat update
2 parents fab7e85 + 72c5356 commit afbc2d5

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

apps/user_status/js/user-status-menu.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/user_status/js/user-status-menu.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/user_status/src/UserStatus.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,12 @@ export default {
155155
* @private
156156
*/
157157
async _backgroundHeartbeat() {
158-
await sendHeartbeat(this.isAway)
158+
try {
159+
await sendHeartbeat(this.isAway)
160+
} catch (error) {
161+
console.debug('Failed sending heartbeat, got: ' + error.response.status)
162+
return
163+
}
159164
await this.$store.dispatch('reFetchStatusFromServer')
160165
},
161166
},

0 commit comments

Comments
 (0)