Skip to content

Commit 20e5951

Browse files
committed
Better silencing of the 404 errors
1 parent a901587 commit 20e5951

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/feeds/AutoModManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,7 @@ async function checkFilePreview(mod: Partial<IMod>, user: DiscordBotUser, badFil
380380
});
381381
// No content preview (there's always a link, but it's not always valid!)
382382
// if (request.status === 404) flags.low.push('No content preview for latest file.')
383-
if (![404, 200].includes(request.status)) flags.low.push(`Failed to get content preview. HTTP ERROR ${request.status}`);
384-
else {
383+
if (request.status === 200) {
385384
const allFiles: string[] = flattenDirectory(request.data);
386385

387386
// Check known bad files
@@ -402,6 +401,7 @@ async function checkFilePreview(mod: Partial<IMod>, user: DiscordBotUser, badFil
402401
}
403402

404403
}
404+
else if (![404, 200].includes(request.status)) flags.low.push(`Failed to get content preview. HTTP ERROR ${request.status}`);
405405

406406
}
407407
catch(err) {

0 commit comments

Comments
 (0)