Skip to content

Commit 7b4122f

Browse files
committed
Return an error if form fails
1 parent 5c4b283 commit 7b4122f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

upload/upload.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,8 @@ func form(port, board, file string, auth Auth, l Logger) error {
360360

361361
// Check the response
362362
if res.StatusCode != http.StatusOK {
363-
return errors.Wrapf(err, "Bad status: %s", res.Status)
363+
body, _ := ioutil.ReadAll(res.Body)
364+
return errors.New("Request error:" + string(body))
364365
}
365366
return nil
366367
}

0 commit comments

Comments
 (0)