Skip to content

Commit

Permalink
Fix Jira Service error handling (gitlabhq#363)
Browse files Browse the repository at this point in the history
  • Loading branch information
armsnyder authored and sfang97 committed Sep 8, 2020
1 parent 4d95dbe commit 4a13cca
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions gitlab/resource_gitlab_service_jira.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,8 @@ func resourceGitlabServiceJiraCreate(d *schema.ResourceData, meta interface{}) e

log.Printf("[DEBUG] Create Gitlab Jira service")

_, setServiceErr := client.Services.SetJiraService(project, jiraOptions)
if err != nil {
return fmt.Errorf("[ERROR] Couldn't create Gitlab Jira service: %s", setServiceErr)
if _, err := client.Services.SetJiraService(project, jiraOptions); err != nil {
return fmt.Errorf("couldn't create Gitlab Jira service: %w", err)
}

d.SetId(project)
Expand Down

0 comments on commit 4a13cca

Please sign in to comment.