Skip to content

Commit

Permalink
feat: Display response error message
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Ng <chrng8@gmail.com>
  • Loading branch information
Pytal committed Jun 17, 2024
1 parent fcd87f0 commit 5fd2c2f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/TransferGuestDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ import axios from '@nextcloud/axios'
import { generateOcsUrl } from '@nextcloud/router'
import { getCapabilities } from '@nextcloud/capabilities'
import { translate as t } from '@nextcloud/l10n'
import { showError } from '@nextcloud/dialogs'
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
import NcDialog from '@nextcloud/vue/dist/Components/NcDialog.js'
Expand Down Expand Up @@ -114,7 +115,8 @@ export default defineComponent({
})
this.$emit('close', this.userId)
} catch (error) {
logger.error('Failed to transfer guest', { error })
logger.error(error.response?.data?.ocs?.meta?.message, { error })
showError(error.response?.data?.ocs?.meta?.message)
this.$emit('close', false)
}
this.loading = false
Expand Down

0 comments on commit 5fd2c2f

Please sign in to comment.