mirror of
https://github.com/lensapp/lens.git
synced 2025-01-06 07:58:51 +03:00
Don't retry metrics on 404 status code (#152)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
1aaa695cfe
commit
39fdcdb54a
@ -37,7 +37,7 @@ class MetricsRoute extends LensApi {
|
||||
...queryParams
|
||||
}
|
||||
}).catch(async (error) => {
|
||||
if (attempt < maxAttempts) {
|
||||
if (attempt < maxAttempts && (error.statusCode && error.statusCode != 404)) {
|
||||
await new Promise(resolve => setTimeout(resolve, attempt * 1000)); // add delay before repeating request
|
||||
return loadMetrics(query);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user