fix(web): [OCISDEV-1539] show a clear error for deleted public links … (#13167)
fix(web): [OCISDEV-1539] show a clear error for deleted public links and files (#13156)
This commit is contained in:
1 parent
daaac966bf
commit
5ba6ffca3d
2 files changed
+18
-1
No files matched your search
@@ -0,0 +1,11 @@
|
||||
Bugfix: Show a clear error for deleted public links and files in app views
|
||||
|
||||
Opening a file via a public link in an app such as the preview, after the link
|
||||
or the file had been deleted, showed the message "Unknown error". The server
|
||||
answers with an empty 404, which the WebDAV client turns into a generic message,
|
||||
and app views that failed while loading the folder passed only that message on.
|
||||
These views now show "The resource could not be located, it may not exist
|
||||
anymore.", as the other loading paths already did.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/13138
|
||||
https://github.com/owncloud/ocis/pull/13156
|
||||
@@ -66,6 +66,7 @@ import {
|
||||
useSharesStore,
|
||||
useFileActionsExportAsPdf,
|
||||
useAppStore,
|
||||
AppError,
|
||||
useDisableRootOverscroll
|
||||
} from '../../composables'
|
||||
import {
|
||||
@@ -376,7 +377,12 @@ watch(
|
||||
() => appStore.error,
|
||||
() => {
|
||||
if (appStore.error) {
|
||||
loadingError.value = new Error(appStore.error.message)
|
||||
const { statusCode, message } = appStore.error as AppError & { statusCode?: number }
|
||||
loadingError.value = new Error(
|
||||
statusCode === 404 && message === 'Unknown error'
|
||||
? $gettext('The resource could not be located, it may not exist anymore.')
|
||||
: message
|
||||
)
|
||||
loading.value = false
|
||||
return
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user