From 0a6de7e9459d422192c3c5fd9109e30587acf3ac Mon Sep 17 00:00:00 2001 From: jonathang4 Date: Sun, 31 Aug 2025 18:23:14 +0800 Subject: [PATCH] debug --- src/api/controllers/images.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/api/controllers/images.ts b/src/api/controllers/images.ts index 59b224c..6b88f32 100644 --- a/src/api/controllers/images.ts +++ b/src/api/controllers/images.ts @@ -239,6 +239,8 @@ export async function generateImages( }, }, }); + + logger.log(`图片生成查询 ${historyId} errmsg: ${result.errmsg}`); if (!result[historyId]) throw new APIException(EX.API_IMAGE_GENERATION_FAILED, "记录不存在"); status = result[historyId].status; @@ -260,6 +262,7 @@ export async function generateImages( if (validImageUrls.length > 0) { await imagesTaskCache.finishTask(task_id, -1, validImageUrls.join(",")); // Success } else { + logger.error(`图片生成任务 ${task_id} 异常: 图片生成未返回有效链接`); // If no valid URLs but no explicit error thrown earlier, consider it a failure. // This could happen if item_list is empty or items don't have video_url. await imagesTaskCache.finishTask(task_id, -2); // Failure @@ -267,6 +270,7 @@ export async function generateImages( } return validImageUrls; }catch (error) { + logger.error(`图片生成任务 ${task_id} 异常: ${error.message}`); await imagesTaskCache.finishTask(task_id, -2); // Failure due to exception throw error; // Re-throw the error to be handled by the caller }