build: payload task fails if functions are down (#5217)

It can happen that the firebase `payloadGithubStatus` function is temporary disabled because a deploy failed (for example due to deploying while function executes).
This leads to a failure inside of the payload CI task because the task is trying to parse the body using JSON (which is not always a JSON response)

It's not worth trying to parse the JSON value since it's only used for debugging and to give an insight what's going on in the functions.
This commit is contained in:
Paul Gschwendtner
2017-06-19 20:48:47 +02:00
committed by Jeremy Elbourn
parent 39f22c2aa2
commit 665e667e2d
+1 -1
View File
@@ -127,7 +127,7 @@ async function updateGithubStatus(commitSha: string, packageName: string, packag
if (err) {
reject(`Dashboard Error ${err.toString()}`);
} else {
console.info('Dashboard Response:', JSON.parse(body).message);
console.info(`Dashboard Response (${response.statusCode}): ${body}`);
resolve(response.statusCode);
}
});