From 75caff5f5f3c69a150873347cd37cc2239176722 Mon Sep 17 00:00:00 2001 From: banbxio Date: Wed, 2 Apr 2025 01:35:38 +0800 Subject: [PATCH] fix(downloader): improve error handling by converting error to string --- http/downloader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http/downloader.go b/http/downloader.go index b14e4eaf..ff396efd 100644 --- a/http/downloader.go +++ b/http/downloader.go @@ -108,7 +108,7 @@ func downloadStatusHandler(downloaderCache *cache.Cache) handleFunc { "url": taskCache.URL, "taskID": taskCache.TaskID.String(), "status": taskCache.status, - "error": taskCache.err, + "error": fmt.Sprint(taskCache.err), } w.Header().Set("Content-Type", "application/json") err := json.NewEncoder(w).Encode(&responseBody)