Skip to content

Commit

Permalink
Merge pull request #1559 from nextcloud/backport/1543/stable25
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv authored Feb 27, 2023
2 parents 6e3e72f + 16419e6 commit 42a4cb5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions js/viewer-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/viewer-main.js.map

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion src/views/Viewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,13 @@ export default {
console.debug('File info for ' + path + ' fetched', fileInfo)
await this.openFileInfo(fileInfo, overrideHandlerId)
} catch (error) {
console.error('Could not open file ' + path, error)
if (error?.response?.status === 404) {
logger.error('The file no longer exists, error: ', { error })
showError(t('viewer', 'This file no longer exists'))
this.close()
} else {
console.error('Could not open file ' + path, error)
}
}
},

Expand Down

0 comments on commit 42a4cb5

Please sign in to comment.