Add better error pages
This commit is contained in:
parent
26e8660af4
commit
88236e036c
5 changed files with 57 additions and 5 deletions
|
|
@ -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 });
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue