mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-12 06:27:10 +03:00
skipSegments return 400 if bad categories
This commit is contained in:
@@ -306,7 +306,9 @@ async function endpoint(req: Request, res: Response): Promise<void> {
|
||||
res.send(segments);
|
||||
}
|
||||
} catch (err) {
|
||||
res.status(500).send();
|
||||
if (err instanceof SyntaxError) {
|
||||
res.status(400).send("Categories parameter does not match format requirements.");
|
||||
} else res.status(500).send();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user