rest: fix missing error check

This commit is contained in:
Lars Lehtonen 2019-09-13 15:50:39 -07:00 committed by Nick Craig-Wood
parent 3b91fb6a2f
commit c93e0ff8ee

View File

@ -444,6 +444,9 @@ func (api *Client) callCodec(ctx context.Context, opts *Opts, request interface{
var overhead int64
opts.Body, opts.ContentType, overhead, err = MultipartUpload(opts.Body, params, opts.MultipartContentName, opts.MultipartFileName)
if err != nil {
return nil, err
}
if opts.ContentLength != nil {
*opts.ContentLength += overhead
}