Skip to content

Commit

Permalink
x-pack/filebeat/input/entityanalytics/provider/okta/internal/okta: ha…
Browse files Browse the repository at this point in the history
…ndle empty responses gracefully (#37092)
  • Loading branch information
efd6 authored Nov 13, 2023
1 parent e51d616 commit 9b932c4
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 @@ -87,6 +87,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]
- Add validation to http_endpoint config for empty URL {pull}36816[36816] {issue}36772[36772]
- Fix merging of array fields(processors, paths, parsers) in configurations generated from hints and default config. {issue}36838[36838] {pull}36857[36857]
- Fix handling of response errors in HTTPJSON and CEL request trace logging. {pull}36956[36956]
- 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 9b932c4

Please sign in to comment.