Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions src/assistant.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,10 @@ export async function openAssistantForm({
})
})
.catch(error => {
app.unmount()
console.error('Assistant scheduling error', error)
showError(t('assistant', 'Assistant error') + ': ' + error?.response?.data)
reject(new Error('Assistant scheduling error'))
view.loading = false
view.showSyncTaskRunning = false
console.error('Assistant scheduling error', error?.response?.data?.ocs?.data?.message)
showError(t('assistant', 'Assistant error') + ': ' + t('assistant', 'Something went wrong when scheduling the task'))
})
}
modalMountPoint.addEventListener('sync-submit', (data) => {
Expand Down Expand Up @@ -589,10 +589,10 @@ export async function openAssistantTask(
})
})
.catch(error => {
app.unmount()
console.error('Assistant scheduling error', error)
showError(t('assistant', 'Assistant error') + ': ' + error?.response?.data)
// reject(new Error('Assistant scheduling error'))
view.loading = false
view.showSyncTaskRunning = false
console.error('Assistant scheduling error', error?.response?.data?.ocs?.data?.message)
showError(t('assistant', 'Assistant error') + ': ' + t('assistant', 'Something went wrong when scheduling the task'))
})
}
modalMountPoint.addEventListener('sync-submit', (data) => {
Expand Down Expand Up @@ -731,7 +731,10 @@ export async function addAssistantMenuEntry() {
}, 1000)
openAssistantForm({ appId: 'assistant' })
.then(r => {
console.debug('scheduled task', r)
console.debug('[Assistant header menu entry] scheduled task', r)
})
.catch(error => {
console.error('[Assistant header menu entry] Assistant openAssistantForm promise rejected:', error.message)
})
})
}
6 changes: 4 additions & 2 deletions src/views/AssistantPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,10 @@ export default {
})
})
.catch(error => {
console.error('Assistant scheduling error', error)
showError(t('assistant', 'Failed to schedule your task'))
this.loading = false
this.showSyncTaskRunning = false
console.error('Assistant scheduling error', error?.response?.data?.ocs?.data?.message)
showError(t('assistant', 'Assistant error') + ': ' + t('assistant', 'Something went wrong when scheduling the task'))
})
.then(() => {
})
Expand Down