Skip to content

Commit

Permalink
Merge pull request #7861 from owncloud/non-200-app-extermnal-response…
Browse files Browse the repository at this point in the history
…-handling

continue on non 2xx responses
  • Loading branch information
fschade authored Oct 25, 2022
2 parents ab3ac71 + 9e0a351 commit 74cfb1d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-external-app-error-handling
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Handle non 2xx external app responses

Axios no longer skips on non 200 status responses in app-external.
If the status is not 2xx, the application now displays a proper error message.

https://github.com/owncloud/web/pull/7861
4 changes: 3 additions & 1 deletion packages/web-app-external/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ export default defineComponent({
...(this.applicationName && { app_name: this.applicationName })
})
const url = `${baseUrl}?${query}`
const response = await this.makeRequest('POST', url)
const response = await this.makeRequest('POST', url, {
validateStatus: () => true
})
if (response.status !== 200) {
this.errorMessage = response.message
Expand Down
3 changes: 3 additions & 0 deletions packages/web-runtime/src/helpers/additionalTranslations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ function $gettext(msg: string): string {
}

export const additionalTranslations = {
fileInProcessing: $gettext(
'This file is currently being processed and is not yet available for use. Please try again shortly.'
),
activities: $gettext('Activities'),
noActivities: $gettext('No activities'),
virusDetectedActivity: $gettext(
Expand Down

0 comments on commit 74cfb1d

Please sign in to comment.