Skip to content

Commit

Permalink
🐛 fix: 429 예외처리
Browse files Browse the repository at this point in the history
  • Loading branch information
kms0219kms committed Dec 31, 2023
1 parent 4b0d9a0 commit 606999f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,12 @@ export default {
})
).data
} catch (e) {
if (e.response?.status === 429) {
setTimeout(() => {
window.location.reload()
}, e.response?.data.error.retry_after * 1000)
}
catchNetworkError(e)
}
},
Expand All @@ -216,7 +222,7 @@ export default {
data() {
return {
showServerMenu: false,
server: [{ name: this.$t('sidebar.loading'), icon: 'test.png' }],
server: [{ id: this.$route.query.id, name: this.$t('sidebar.loading'), icon: 'test.png' }],
showNav: true,
isMobile: false,
}
Expand Down

0 comments on commit 606999f

Please sign in to comment.