diff options
author | Josh Bialkowski <josh.bialkowski@gmail.com> | 2019-11-14 15:56:32 -0800 |
---|---|---|
committer | Josh Bialkowski <josh.bialkowski@gmail.com> | 2019-12-18 07:42:16 -0800 |
commit | 7657a38ff20a7b3b2dbec5e6c981038c871f46e7 (patch) | |
tree | f7460532ab2ce706dfd33096469d57d5a006dc5b /bridge/jira/client.go | |
parent | eff830bdcb8f979da34fb9e8f782efb1598b4a44 (diff) | |
download | git-bug-7657a38ff20a7b3b2dbec5e6c981038c871f46e7.tar.gz |
codereview #1: clean lint from golangcibot
Diffstat (limited to 'bridge/jira/client.go')
-rw-r--r-- | bridge/jira/client.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bridge/jira/client.go b/bridge/jira/client.go index bfc30039..486c1a87 100644 --- a/bridge/jira/client.go +++ b/bridge/jira/client.go @@ -1363,6 +1363,9 @@ func (client *Client) DoTransition( `{"transition":{"id":"%s"}, "resolution": {"name": "Done"}}`, transitionID) request, err := http.NewRequest("POST", url, bytes.NewBuffer(buffer.Bytes())) + if err != nil { + return responseTime, err + } if client.ctx != nil { ctx, cancel := context.WithTimeout(*client.ctx, defaultTimeout) @@ -1378,9 +1381,9 @@ func (client *Client) DoTransition( defer response.Body.Close() if response.StatusCode != http.StatusNoContent { - err := fmt.Errorf( + err := errors.Wrap(errTransitionNotAllowed, fmt.Sprintf( "HTTP response %d, query was %s", response.StatusCode, - request.URL.String()) + request.URL.String())) return responseTime, err } |