Formerly KrillinAI, VideoTranslation and Dubbing Tool for 120+ Languages. Open-source AI workspace for creators, powered by Codex. Video downloader, video translation, create videos, images, audios, and edits with Agents in one place. For your Social Media like YouTube, TikTok, Instagram, etc.
TypeScript agent-skillscodex-clideskop-appdubbingimage-generationlocalizationskillsttsvideo-editingvideo-generationvideo-transcriptionvideo-translation
feat: handle failed task
沈浩dda4a0be21a6
diff --git a/internal/service/subtitle_service.go b/internal/service/subtitle_service.goindex b8f927df..d7d609dd 100644--- a/internal/service/subtitle_service.go+++ b/internal/service/subtitle_service.go@@ -183,6 +183,9 @@ func (s Service) GetTaskStatus(req dto.GetVideoSubtitleTaskReq) (*dto.GetVideoSuif task == nil {return nil, errors.New("任务不存在")}+ if task.Status == types.SubtitleTaskStatusFailed {+ return nil, fmt.Errorf("任务失败,原因:%s", task.FailReason)+ }return &dto.GetVideoSubtitleTaskResData{TaskId: task.TaskId,ProcessPercent: task.ProcessPct,