fix: handle network connectivity in DUI (#80)
* error handler * top-level handling * internet check * pass other network errors --------- Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
This commit is contained in:
@@ -6920,6 +6920,7 @@ export type WorkspacePermissionChecks = {
|
||||
canReadSecuritySettings: PermissionCheckResult;
|
||||
canReadWorkspaceIssueLabels: PermissionCheckResult;
|
||||
canRemoveUser: PermissionCheckResult;
|
||||
canUseAdminSupportTools: PermissionCheckResult;
|
||||
canUseExperimentalDashboardFeatures: PermissionCheckResult;
|
||||
};
|
||||
|
||||
|
||||
+7
-8
@@ -165,14 +165,13 @@ export const useAccountStore = defineStore('accountStore', () => {
|
||||
// hostAppStore.setNotification(notification)
|
||||
}
|
||||
|
||||
// if (res.networkError) {
|
||||
// const notification: ToastNotification = {
|
||||
// type: ToastNotificationType.Danger,
|
||||
// title: 'Network Error',
|
||||
// description: res.networkError.message
|
||||
// }
|
||||
// hostAppStore.setNotification(notification)
|
||||
// }
|
||||
if (res.networkError && !navigator.onLine) {
|
||||
hostAppStore.setNotification({
|
||||
type: ToastNotificationType.Danger,
|
||||
title: 'No Internet Connection',
|
||||
description: 'Please check your network connection and try again.'
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
const link = splitLink(
|
||||
|
||||
Reference in New Issue
Block a user