Skip to content

Commit

Permalink
chore: Log transfer error
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Ng <[email protected]>
  • Loading branch information
Pytal committed Jun 13, 2024
1 parent 6ba7f33 commit 9ab3094
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"@nextcloud/dialogs": "^5.3.2",
"@nextcloud/event-bus": "^3.3.1",
"@nextcloud/l10n": "^3.1.0",
"@nextcloud/logger": "^3.0.2",
"@nextcloud/router": "^3.0.1",
"@nextcloud/sharing": "^0.1.0",
"@nextcloud/vue": "^8.12.0",
Expand Down
3 changes: 3 additions & 0 deletions src/components/TransferGuestDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ import NcLoadingIcon from '@nextcloud/vue/dist/Components/NcLoadingIcon.js'
import NcPasswordField from '@nextcloud/vue/dist/Components/NcPasswordField.js'
import NcTextField from '@nextcloud/vue/dist/Components/NcTextField.js'
import { logger } from '../logger.ts'
const minPasswordLength = getCapabilities()?.password_policy?.minLength
export default defineComponent({
Expand Down Expand Up @@ -112,6 +114,7 @@ export default defineComponent({
})
this.$emit('close', this.userId)
} catch (error) {
logger.error('Failed to transfer guest', { error })
this.$emit('close', false)
}
this.loading = false
Expand Down
11 changes: 11 additions & 0 deletions src/logger.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import { getLoggerBuilder } from '@nextcloud/logger'

export const logger = getLoggerBuilder()
.setApp('guests')
.detectUser()
.build()

0 comments on commit 9ab3094

Please sign in to comment.