diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index a358d99c5903..8db6607210b7 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -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* diff --git a/x-pack/filebeat/input/entityanalytics/provider/okta/internal/okta/okta.go b/x-pack/filebeat/input/entityanalytics/provider/okta/internal/okta/okta.go index 30f5e0d41663..aae221e6be94 100644 --- a/x-pack/filebeat/input/entityanalytics/provider/okta/internal/okta/okta.go +++ b/x-pack/filebeat/input/entityanalytics/provider/okta/internal/okta/okta.go @@ -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 }