Skip to content

Commit

Permalink
fix: Handle log responses as text (#7776)
Browse files Browse the repository at this point in the history
Signed-off-by: Sami Tiilikainen <97873007+samitiilikainen@users.noreply.github.com>
  • Loading branch information
samitiilikainen authored May 25, 2023
1 parent 738985c commit 90c449c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/core/src/common/k8s-api/endpoints/pod.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit 90c449c

Please sign in to comment.