Skip to content

Commit

Permalink
🐛 Catch 404 on stripe profile fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Dec 11, 2024
1 parent 9bdcd58 commit ef67d8f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion pages/nft-book-store/user/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,12 @@ onMounted(async () => {
loadCommissionHistory(),
refreshUserLikerInfo(),
refreshStripeConnectStatus(),
userStore.lazyFetchBookUserProfile()
userStore.lazyFetchBookUserProfile().catch((e: Error) => {
if (e.message !== 'USER_NOT_FOUND') {
// eslint-disable-next-line no-console
console.error(e)
}
})
])
if (isStripeConnectReady.value) { await loadPayoutHistory() }
})
Expand Down
7 changes: 6 additions & 1 deletion stores/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,12 @@ export const useUserStore = defineStore('user', () => {
watch(isAuthenticated, () => {
if (isAuthenticated.value) {
lazyFetchUserLikerInfo()
lazyFetchBookUserProfile()
lazyFetchBookUserProfile().catch((e: Error) => {
if (e.message !== 'USER_NOT_FOUND') {
// eslint-disable-next-line no-console
console.error(e)
}
})
} else {
bookUser.value = null
}
Expand Down

0 comments on commit ef67d8f

Please sign in to comment.