mirror of
https://github.com/interviewstreet/go-jira.git
synced 2025-07-15 01:04:38 +02:00
Handle error with NewJiraError
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user