1
0
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:
Nate Mara 2018-06-29 10:01:28 -04:00
parent 77ea07b2ce
commit 937f5bdca8

View File

@ -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
}