fix(datasetQuality): downgrade registry 404 log from error to debug#272069
Draft
elastic-vault-github-plugin-prod[bot] wants to merge 1 commit into
Draft
Conversation
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.
|
❌ Author of the following commits did not sign a Contributor Agreement: Please, read and sign the above mentioned agreement if you want to contribute to this project |
|
🤖 Jobs for this PR can be triggered through checkboxes. 🚧
ℹ️ To trigger the CI, please tick the checkbox below 👇
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
fetchDatasetswithinget_integrations.ts, the catch block only silencedPackageNotFoundError(custom integrations). All other errors, includingRegistryResponseErrorwith HTTP 404 status (which the registry returns asUnknown resource.), fell through tologger.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: ImportRegistryResponseErrorandFleetUnauthorizedErrorfrom fleet errors; addshouldLogAsDebugcheck that routesRegistryResponseErrorwithstatus < 500andFleetUnauthorizedErrortologger.debuginstead oflogger.error.Closes https://github.com/elastic/observability-error-backlog/issues/882
Opened by Fix Ralph