1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Reduce logging on failure to get cluster metrics (#4284)

This commit is contained in:
Sebastian Malton 2021-11-12 08:51:37 -05:00 committed by GitHub
parent 673f20fb74
commit b550ea9178
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,7 +46,7 @@ async function loadMetrics(promQueries: string[], cluster: Cluster, prometheusPa
return await getMetrics(cluster, prometheusPath, { query, ...queryParams });
} catch (error) {
if (lastAttempt || (error?.statusCode >= 400 && error?.statusCode < 500)) {
logger.error("[Metrics]: metrics not available", { error });
logger.error("[Metrics]: metrics not available", error);
throw new Error("Metrics not available");
}