Add better error pages

This commit is contained in:
calzoneman 2015-10-27 20:44:40 -07:00
parent 26e8660af4
commit 88236e036c
5 changed files with 57 additions and 5 deletions

View file

@ -7,7 +7,7 @@ import { HTTPError } from '../../errors';
export default function initialize(app, ioConfig) {
app.get('/r/:channel', (req, res) => {
if (!req.params.channel || !CyTubeUtil.isValidChannelName(req.params.channel)) {
throw new HTTPError(`"${sanitizeText(req.params.channel)} is not a valid ` +
throw new HTTPError(`"${sanitizeText(req.params.channel)}" is not a valid ` +
'channel name.', { status: HTTPStatus.BAD_REQUEST });
}