Skip to content

Commit

Permalink
[8.11](backport #37092) x-pack/filebeat/input/entityanalytics/provide…
Browse files Browse the repository at this point in the history
…r/okta/internal/okta: handle empty responses gracefully (#37099)

* x-pack/filebeat/input/entityanalytics/provider/okta/internal/okta: handle empty responses gracefully (#37092)

(cherry picked from commit 9b932c4)

* remove irrelevant changelog lines

---------

Co-authored-by: Dan Kortschak <90160302+efd6@users.noreply.github.com>
  • Loading branch information
mergify[bot] and efd6 committed Nov 13, 2023
1 parent 19c8672 commit 338471c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]
- Fix panic when sqs input metrics getter is invoked {pull}36101[36101] {issue}36077[36077]
- Fix handling of Juniper SRX structured data when there is no leading junos element. {issue}36270[36270] {pull}36308[36308]
- Fix Filebeat Cisco module with missing escape character {issue}36325[36325] {pull}36326[36326]
- Do not error when Okta API returns no data. {pull}37092[37092]

*Heartbeat*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@ func getDetails[E entity](ctx context.Context, cli *http.Client, u *url.URL, key
}

var body bytes.Buffer
_, err = io.Copy(&body, resp.Body)
if err != nil {
n, err := io.Copy(&body, resp.Body)
if n == 0 || err != nil {
return nil, nil, err
}

Expand Down

0 comments on commit 338471c

Please sign in to comment.