From c93e0ff8ee2145386f347a0584fefa8e3a0147f9 Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Fri, 13 Sep 2019 15:50:39 -0700 Subject: [PATCH] rest: fix missing error check --- lib/rest/rest.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/rest/rest.go b/lib/rest/rest.go index 1a746f090..0cdccf028 100644 --- a/lib/rest/rest.go +++ b/lib/rest/rest.go @@ -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 }