Skip to content

fix(datasetQuality): downgrade registry 404 log from error to debug#272070

Draft
elastic-vault-github-plugin-prod[bot] wants to merge 1 commit into
8.19from
ralph-fix/issue-882-downgrade-registry-404-log-level-8.19
Draft

fix(datasetQuality): downgrade registry 404 log from error to debug#272070
elastic-vault-github-plugin-prod[bot] wants to merge 1 commit into
8.19from
ralph-fix/issue-882-downgrade-registry-404-log-level-8.19

Conversation

@elastic-vault-github-plugin-prod
Copy link
Copy Markdown
Contributor

Summary

When the Fleet package registry returns a 404 response (e.g. {"ok":false,"message":"Unknown resource."}) during dataset quality integration lookups, the error was incorrectly logged at ERROR level. This fix downgrades those expected 4xx responses to debug level.

Root Cause

In fetchDatasets within get_integrations.ts, the catch block only silenced PackageNotFoundError (custom integrations). All other errors, including RegistryResponseError with HTTP 404 status (which the registry returns as Unknown resource.), fell through to logger.error(). These 4xx errors are user-facing conditions (package version not found in registry), not Kibana server faults.

Changes

  • x-pack/platform/plugins/shared/dataset_quality/server/routes/integrations/get_integrations.ts: Import RegistryResponseError and FleetUnauthorizedError from fleet errors; add shouldLogAsDebug check that routes RegistryResponseError with status < 500 and FleetUnauthorizedError to logger.debug instead of logger.error.

Closes https://github.com/elastic/observability-error-backlog/issues/882


Opened by Fix Ralph

When fetchDatasets calls packageClient.getPackage() and the Fleet registry
returns a 404 (Unknown resource), the RegistryResponseError was being logged
at ERROR level. These 4xx responses are user-facing conditions (package not
found in registry), not Kibana server faults. Log RegistryResponseError
with status < 500 and FleetUnauthorizedError at debug level instead.
@cla-checker-service
Copy link
Copy Markdown

❌ Author of the following commits did not sign a Contributor Agreement:
29654b6

Please, read and sign the above mentioned agreement if you want to contribute to this project

@infra-vault-gh-plugin-prod
Copy link
Copy Markdown

🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!
  • Click to trigger kibana-deploy-project-from-pr for this PR!
  • Click to trigger kibana-deploy-cloud-from-pr for this PR!
  • Click to trigger kibana-entity-store-performance-from-pr for this PR!
  • Click to trigger kibana-storybooks-from-pr for this PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants