1
0
mirror of https://github.com/lensapp/lens.git synced 2024-10-26 09:47:18 +03:00

fix: Handle log responses as text (#7776)

Signed-off-by: Sami Tiilikainen <97873007+samitiilikainen@users.noreply.github.com>
This commit is contained in:
Sami Tiilikainen 2023-05-25 16:23:18 +03:00 committed by GitHub
parent 738985c9b7
commit 90c449cc0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,6 +57,12 @@ export class PodApi extends KubeApi<Pod> {
async getLogs(params: ResourceDescriptor, query?: PodLogsQuery): Promise<string> {
const path = `${this.getUrl(params)}/log`;
return this.request.get(path, { query });
const logs = await this.request.get(path, { query });
if (typeof logs !== "string") {
return "";
}
return logs;
}
}