Skip to content

Fix error handling in getMetricDescriptors#1219

Merged
PlateauGao merged 1 commit into
GoogleCloudPlatform:masterfrom
courageJ:fix-metric-descriptor-refresh-error
Jun 16, 2026
Merged

Fix error handling in getMetricDescriptors#1219
PlateauGao merged 1 commit into
GoogleCloudPlatform:masterfrom
courageJ:fix-metric-descriptor-refresh-error

Conversation

@courageJ

Copy link
Copy Markdown
Contributor

getMetricDescriptors was returning a nil error even when it failed to fetch metric descriptors due to an API error. This caused the cache manager to overwrite the descriptor cache with partial or empty data, silencing metric exports.

This change ensures that the actual error is returned so that the cache manager can retain the previous cache.

getMetricDescriptors was returning a nil error even when it failed to
fetch metric descriptors due to an API error. This caused the cache
manager to overwrite the descriptor cache with partial or empty data,
silencing metric exports.

This change ensures that the actual error is returned so that the cache
manager can retain the previous cache.
@PlateauGao PlateauGao merged commit 8c06a0e into GoogleCloudPlatform:master Jun 16, 2026
18 checks passed
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.

2 participants