Fix: error handling

pull/273/head
Frostebite 2021-06-18 19:57:50 +01:00
parent 3430d9b1f8
commit 2d0bc453aa
3 changed files with 5 additions and 3 deletions

3
dist/index.js vendored
View File

@ -806,7 +806,7 @@ class Kubernetes {
yield this.cleanup();
}
catch (error) {
core.error(JSON.stringify(error.response.body, undefined, 4));
core.error(JSON.stringify(error.response, undefined, 4));
throw error;
}
core.setOutput('volume', this.pvcName);
@ -997,6 +997,7 @@ class Kubernetes {
this.setPodNameAndContainerName(yield this.getPod());
yield this.watchUntilPodRunning();
yield this.streamLogs();
yield this.cleanup();
}
catch (error) {
yield this.cleanup();

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -92,7 +92,7 @@ class Kubernetes implements RemoteBuilderProviderInterface {
await this.cleanup();
} catch (error) {
core.error(JSON.stringify(error.response.body, undefined, 4));
core.error(JSON.stringify(error.response, undefined, 4));
throw error;
}
@ -281,6 +281,7 @@ class Kubernetes implements RemoteBuilderProviderInterface {
this.setPodNameAndContainerName(await this.getPod());
await this.watchUntilPodRunning();
await this.streamLogs();
await this.cleanup();
} catch (error) {
await this.cleanup();
throw error;