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 authored and GitHub committed 2023-05-25 09:23:18 -04:00
1 parent 738985c9b7
commit 90c449cc0d
1 file changed
+7 -1
@@ -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;
}
}