Let NB mod fail on any internal server error

This commit is contained in:
Andrew Lee
2020-04-30 14:16:19 -07:00
parent 074e9fc0eb
commit 9fcd23d63a

View File

@@ -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){