1
0
mirror of https://github.com/interviewstreet/go-jira.git synced 2025-01-05 22:53:53 +02:00

Fixed a nil response when getting a session cookie

This commit is contained in:
Brent Hughes 2016-08-16 12:56:26 -05:00
parent ae45380959
commit dbaf2d76f2

View File

@ -53,7 +53,10 @@ func (s *AuthenticationService) AcquireSessionCookie(username, password string)
session := new(Session)
resp, err := s.client.Do(req, session)
session.Cookies = resp.Cookies()
if resp != nil {
session.Cookies = resp.Cookies()
}
if err != nil {
return false, fmt.Errorf("Auth at JIRA instance failed (HTTP(S) request). %s", err)