diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-07-23 18:44:20 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-07-23 18:44:20 (GMT) |
commit | 0122d9b0c8f94b067d8d5210deb95b33963f037e (patch) | |
tree | 2608941cffbc4e15d513b6b7cd31c997ddbeac80 /rhimport | |
parent | a42abed52db0006ecd609300bbf064bcb49ea10d (diff) |
changed return code when attachment is too short
Diffstat (limited to 'rhimport')
-rw-r--r-- | rhimport/fetcher.go | 6 |
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 { |