mirror of
https://github.com/interviewstreet/go-jira.git
synced 2025-02-09 13:36:58 +02:00
Handle error with NewJiraError
This commit is contained in:
parent
77ea07b2ce
commit
937f5bdca8
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user