Skip to content

Commit

Permalink
Handle error with NewJiraError
Browse files Browse the repository at this point in the history
  • Loading branch information
Nate Mara committed Jun 29, 2018
1 parent 77ea07b commit 937f5bd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion component.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,9 @@ func (s *ComponentService) Create(options *CreateComponentOptions) (*ProjectComp
component := new(ProjectComponent)
resp, err := s.client.Do(req, component)

return component, resp, err
if err != nil {
return nil, resp, NewJiraError(resp, err)
}

return component, resp, nil
}

0 comments on commit 937f5bd

Please sign in to comment.