fix(github): handle 451 errors

This commit is contained in:
Rhys Arkins 2019-06-01 11:39:03 +02:00
parent 8fd03d7ae8
commit 53dfe77aa4

View file

@ -237,6 +237,9 @@ async function initRepo({
if (err.message === 'fork') {
throw err;
}
if (err.message === 'Response code 451 (Unavailable for Legal Reasons)') {
throw new Error('forbidden');
}
logger.info({ err }, 'Unknown GitHub initRepo error');
throw err;
}