From b21a425e24f5543802e7267369f37967d4805697 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Mon, 8 May 2023 10:16:47 -0400 Subject: [PATCH] fix: dont try to stream if we have an error --- service/files_service.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/service/files_service.go b/service/files_service.go index 2c70890..a0ed4be 100644 --- a/service/files_service.go +++ b/service/files_service.go @@ -155,7 +155,9 @@ func (f *FilesService) GetDownload() { ctx.Header("Transfer-Encoding", "chunked") - internalError(ctx, err) + if internalError(ctx, err) { + return + } err = ctx.StreamWriter(func(w io.Writer) error { _, err = io.Copy(w, fetch.RawBody())