Reinstate debug statements

This commit is contained in:
Luc Perkins 2024-05-20 13:58:18 -03:00
parent 6551db427e
commit fe4aeab234
No known key found for this signature in database
GPG key ID: 16DB1108FB591835

View file

@ -277,6 +277,10 @@ class MagicNixCacheAction {
`http://${this.hostAndPort}/api/workflow-start`, `http://${this.hostAndPort}/api/workflow-start`,
); );
actionsCore.debug(
`Response from 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 (status: ${res.statusCode}, body: ${res.body})`, `Failed to trigger workflow start hook; expected status 200 but got (status: ${res.statusCode}, body: ${res.body})`,
@ -316,6 +320,10 @@ class MagicNixCacheAction {
`http://${this.hostAndPort}/api/workflow-finish`, `http://${this.hostAndPort}/api/workflow-finish`,
); );
actionsCore.debug(
`Response from 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 (status: ${res.statusCode}, body: ${res.body})`, `Failed to trigger workflow finish hook; expected status 200 but got (status: ${res.statusCode}, body: ${res.body})`,