From 53442c5a34c8bdea444e74c48a3232da22d1325f Mon Sep 17 00:00:00 2001 From: wangdl Date: Fri, 19 Jun 2026 11:57:25 +0800 Subject: [PATCH] debug: add APIError detail logging to flush Co-Authored-By: Claude Opus 4.7 --- .../Features/MaterialReader/ReadingEventUploadQueue.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/AIStudyApp/AIStudyApp/Features/MaterialReader/ReadingEventUploadQueue.swift b/AIStudyApp/AIStudyApp/Features/MaterialReader/ReadingEventUploadQueue.swift index 88b9018..42fba25 100644 --- a/AIStudyApp/AIStudyApp/Features/MaterialReader/ReadingEventUploadQueue.swift +++ b/AIStudyApp/AIStudyApp/Features/MaterialReader/ReadingEventUploadQueue.swift @@ -244,6 +244,7 @@ final class ReadingEventUploadPipeline { print("[UploadPipeline] Flushed \(response.processed) events") } catch let error as APIError { let errorCode = error.errorCode ?? "NETWORK_ERROR" + print("[UploadPipeline] APIError: statusCode=\(error.statusCode ?? -1), errorCode=\(error.errorCode ?? "nil"), message=\(error.message)") switch error.statusCode { case 401: // Auth expired — keep items pending, wait for re-login