From 9fcd23d63ac3c74649cf95e4aede9c57980356e3 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Thu, 30 Apr 2020 14:16:19 -0700 Subject: [PATCH] Let NB mod fail on any internal server error --- src/routes/postSkipSegments.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/postSkipSegments.js b/src/routes/postSkipSegments.js index 9c9b5a2..dc74379 100644 --- a/src/routes/postSkipSegments.js +++ b/src/routes/postSkipSegments.js @@ -113,7 +113,7 @@ async function autoModerateSubmission(submission, callback) { } else { let overlap = false; http = await fetch("https://ai.neuralblock.app/api/getSponsorSegments?vid=" + submission.videoID); - if (http.status === 500) return false; + if (http.status >= 500 && http.status < 600) return false; nb_predictions = await http.json(); for (const nb_seg of nb_predictions.sponsorSegments){