only fail on 4xx, 5xx and other real errors

This commit is contained in:
Hugo Di Francesco 2020-01-13 15:52:44 +00:00
parent d681750ba2
commit 0e4168908c

View file

@ -58,7 +58,7 @@ function getStatusCode(url) {
async function isWorkingUrl(url) {
try {
const statusCode = await getStatusCode(url);
if (statusCode < 200 || statusCode >= 300) {
if (statusCode < 200 || statusCode >= 400) {
core.error(`Ping to "${url}" failed with status: ${statusCode}`);
return false;
}