Improve k8s logging accuracy

pull/496/head
Frostebite 2023-02-02 21:41:51 +00:00
parent 186a31b6a2
commit 5bf2cdae38
3 changed files with 4 additions and 5 deletions

3
dist/index.js generated vendored
View File

@ -3332,8 +3332,7 @@ class Kubernetes {
catch (_c) { catch (_c) {
errorParsed = error; errorParsed = error;
} }
const reason = errorParsed.reason || ((_b = (_a = errorParsed.response) === null || _a === void 0 ? void 0 : _a.body) === null || _b === void 0 ? void 0 : _b.reason) || ``; const errorMessage = errorParsed.name || errorParsed.reason || ((_b = (_a = errorParsed.response) === null || _a === void 0 ? void 0 : _a.body) === null || _b === void 0 ? void 0 : _b.reason) || errorParsed.message;
const errorMessage = reason || errorParsed.message;
const continueStreaming = errorMessage.includes(`dial timeout, backstop`) || const continueStreaming = errorMessage.includes(`dial timeout, backstop`) ||
errorMessage.includes(`HttpError: HTTP request failed`) || errorMessage.includes(`HttpError: HTTP request failed`) ||
errorMessage.includes(`an error occurred when try to find container`) || errorMessage.includes(`an error occurred when try to find container`) ||

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -163,8 +163,8 @@ class Kubernetes implements ProviderInterface {
errorParsed = error; errorParsed = error;
} }
const reason = errorParsed.reason || errorParsed.response?.body?.reason || ``; const errorMessage =
const errorMessage = reason || errorParsed.message; errorParsed.name || errorParsed.reason || errorParsed.response?.body?.reason || errorParsed.message;
const continueStreaming = const continueStreaming =
errorMessage.includes(`dial timeout, backstop`) || errorMessage.includes(`dial timeout, backstop`) ||