From 9215b0f848409233d4586c0b902438017cbe1e33 Mon Sep 17 00:00:00 2001 From: Omer Zidkoni Date: Wed, 10 Apr 2024 09:55:00 +0300 Subject: [PATCH] Return error from WriteFilesToStream --- http/filestream/filestream.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http/filestream/filestream.go b/http/filestream/filestream.go index a6b2ca2..3e00549 100644 --- a/http/filestream/filestream.go +++ b/http/filestream/filestream.go @@ -73,7 +73,7 @@ func WriteFilesToStream(multipartWriter *multipart.Writer, filesList []*FileInfo defer ioutils.Close(multipartWriter, &err) for _, file := range filesList { if err = writeFile(multipartWriter, file); err != nil { - return writeErr(multipartWriter, file, err) + return errors.Join(err, writeErr(multipartWriter, file, err)) } }