aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/jira/client.go
diff options
context:
space:
mode:
authorJosh Bialkowski <josh.bialkowski@gmail.com>2019-11-14 15:56:32 -0800
committerJosh Bialkowski <josh.bialkowski@gmail.com>2019-12-18 07:42:16 -0800
commit7657a38ff20a7b3b2dbec5e6c981038c871f46e7 (patch)
treef7460532ab2ce706dfd33096469d57d5a006dc5b /bridge/jira/client.go
parenteff830bdcb8f979da34fb9e8f782efb1598b4a44 (diff)
downloadgit-bug-7657a38ff20a7b3b2dbec5e6c981038c871f46e7.tar.gz
codereview #1: clean lint from golangcibot
Diffstat (limited to 'bridge/jira/client.go')
-rw-r--r--bridge/jira/client.go7
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
}