Skip to content

Commit d2e67ac

Browse files
committed
enh: add console error log when failing to get a task position in the chat UI
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
1 parent 455a340 commit d2e67ac

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

src/components/ChattyLLM/ChattyLLMInputForm.vue

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,11 +1075,15 @@ export default {
10751075
if (error.response.data.task_status === TASK_STATUS_INT.running) {
10761076
this.loading.llmRunning = true
10771077
} else if (error.response.data.task_status === TASK_STATUS_INT.scheduled) {
1078-
getTaskPosition(taskId).then(response => {
1079-
const taskPosition = response.data?.ocs?.data
1080-
this.loading.taskPosition = taskPosition
1081-
console.debug('Task position:', taskPosition)
1082-
})
1078+
getTaskPosition(taskId)
1079+
.then(response => {
1080+
const taskPosition = response.data?.ocs?.data
1081+
this.loading.taskPosition = taskPosition
1082+
console.debug('Task position:', taskPosition)
1083+
})
1084+
.catch(error => {
1085+
console.error('Failed to get task position', error)
1086+
})
10831087
}
10841088
if (!hasPush && typeof error.response.data.task_output !== 'undefined' && error.response.data.task_output !== null) {
10851089
this.updateStreamingMessage(error.response.data.task_output || {}, sessionId)

0 commit comments

Comments
 (0)