From ce8d72c1edf4e892783d35f253be1c4f531f4b0d Mon Sep 17 00:00:00 2001 From: Victor Elias Date: Tue, 25 Jun 2024 18:35:41 +0100 Subject: [PATCH] uploader: Fix error returned when backup URL can't be built --- core/uploader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/uploader.go b/core/uploader.go index 2d04e5a..ac66cba 100644 --- a/core/uploader.go +++ b/core/uploader.go @@ -160,7 +160,7 @@ func uploadFileWithBackup(outputURI *url.URL, fileName string, fields *drivers.F backupURI, err := buildBackupURI(outputURI, storageFallbackURLs) if err != nil { glog.Errorf("failed to build backup URL: %v", err) - return err + return primaryErr } glog.Warningf("Primary upload failed, uploading to backupURL=%s primaryErr=%q", backupURI.Redacted(), primaryErr)