diff --git a/index.js b/index.js index bae486f..4773bfc 100644 --- a/index.js +++ b/index.js @@ -76,8 +76,14 @@ async function isCVEPublished (cveId) { // Return true to avoid false positives return true } - const json = await body.json() - return json.totalResults !== 0 + try { + const json = await body.json() + return json.totalResults !== 0 + } catch (e) { + core.error(`Error while JSON parsing ${cveId}. ${await body.text()}`) + // Return true to avoid false positives + return true + } } async function main () {