mirror of
https://github.com/interviewstreet/go-jira.git
synced 2025-11-25 22:12:08 +02:00
Fix panic for unauthorized response with nil error
This commit is contained in:
committed by
Andy Grunwald
parent
cbab0bba29
commit
53c468062d
3
error.go
3
error.go
@@ -38,6 +38,9 @@ func NewJiraError(resp *Response, httpError error) error {
|
||||
return errors.Wrap(err, httpError.Error())
|
||||
}
|
||||
} else {
|
||||
if httpError == nil {
|
||||
return fmt.Errorf("Got Response Status %s:%s", resp.Status, string(body))
|
||||
}
|
||||
return errors.Wrap(httpError, fmt.Sprintf("%s: %s", resp.Status, string(body)))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user