mirror of
https://github.com/Threnklyn/jira.git
synced 2026-05-18 20:23:28 +02:00
Ensure body is NPE safe
This commit is contained in:
committed by
Louis DeLosSantos
parent
b572037cfe
commit
42e5d23f63
@@ -72,6 +72,9 @@ func CmdRequest(o *oreo.Client, globals *jiracli.GlobalOptions, opts *RequestOpt
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if resp.Body == nil {
|
||||
return fmt.Errorf("Empty Response Body")
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
bodyBytes, err := ioutil.ReadAll(resp.Body)
|
||||
|
||||
Reference in New Issue
Block a user