summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rhimport/fetcher.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/rhimport/fetcher.go b/rhimport/fetcher.go
index f30e57b..801b920 100644
--- a/rhimport/fetcher.go
+++ b/rhimport/fetcher.go
@@ -598,9 +598,9 @@ func writeAttachmentFile(ctx *Context, res *Result, sizeTotal uint64, conv Fetch
return nil
case chunk, ok := <-ctx.AttachmentChan:
if !ok {
- rhl.Printf("receiving attachment '%s' got canceled (channel has been closed prematurely)", ctx.SourceFile)
- res.ResponseCode = http.StatusNoContent
- res.ErrorString = "canceled"
+ rhl.Printf("receiving attachment '%s' failed: channel has been closed prematurely)", ctx.SourceFile)
+ res.ResponseCode = http.StatusBadRequest
+ res.ErrorString = fmt.Sprintf("file upload stopped prematurely (after %d Bytes)", written)
return nil
}
if chunk.Error != nil {