Skip to content

Commit

Permalink
Fix the possible use of nil http request after http.NewRequest return…
Browse files Browse the repository at this point in the history
…s nil, err

Signed-off-by: Aleksandr Maus <aleksandr.maus@elastic.co>
  • Loading branch information
aleksmaus authored and poiana committed Aug 21, 2024
1 parent fd503a4 commit 54ac9bb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions outputs/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ func (c *Client) sendRequest(method string, payload interface{}) error {
}
if err != nil {
log.Printf("[ERROR] : %v - %v\n", c.OutputType, err.Error())
return err
}

req.Header.Add(ContentTypeHeaderKey, c.ContentType)
Expand Down

0 comments on commit 54ac9bb

Please sign in to comment.