mirror of
https://github.com/DeterminateSystems/magic-nix-cache-action.git
synced 2024-12-27 01:30:35 +01:00
Pass HTTP body to failure log
This commit is contained in:
parent
afefc2fc85
commit
a181f8e6e8
1 changed files with 2 additions and 10 deletions
12
src/index.ts
12
src/index.ts
|
@ -277,13 +277,9 @@ class MagicNixCacheAction {
|
||||||
`http://${this.hostAndPort}/api/workflow-start`,
|
`http://${this.hostAndPort}/api/workflow-start`,
|
||||||
);
|
);
|
||||||
|
|
||||||
actionsCore.debug(
|
|
||||||
`post to /api/workflow-start (status: ${res.statusCode}, body: ${res.body})`,
|
|
||||||
);
|
|
||||||
|
|
||||||
if (res.statusCode !== 200) {
|
if (res.statusCode !== 200) {
|
||||||
this.failInStrictMode(
|
this.failInStrictMode(
|
||||||
`Failed to trigger workflow start hook; expected status 200 but got ${res.statusCode}`,
|
`Failed to trigger workflow start hook; expected status 200 but got (status: ${res.statusCode}, body: ${res.body})`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -320,13 +316,9 @@ class MagicNixCacheAction {
|
||||||
`http://${this.hostAndPort}/api/workflow-finish`,
|
`http://${this.hostAndPort}/api/workflow-finish`,
|
||||||
);
|
);
|
||||||
|
|
||||||
actionsCore.debug(
|
|
||||||
`post to /api/workflow-finish (status: ${res.statusCode}, body: ${res.body})`,
|
|
||||||
);
|
|
||||||
|
|
||||||
if (res.statusCode !== 200) {
|
if (res.statusCode !== 200) {
|
||||||
this.failInStrictMode(
|
this.failInStrictMode(
|
||||||
`Failed to trigger workflow finish hook; expected status 200 but got ${res.statusCode}`,
|
`Failed to trigger workflow finish hook; expected status 200 but got (status: ${res.statusCode}, body: ${res.body})`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
|
|
Loading…
Reference in a new issue