throw exception for nonexistent languages in VOA
This commit is contained in:
@@ -13,6 +13,8 @@ module.exports = async (ctx) => {
|
||||
case 'tibetan':
|
||||
baseURL = 'https://www.voatibetan.com/';
|
||||
break;
|
||||
default:
|
||||
throw Error('The language specified does not exist');
|
||||
}
|
||||
|
||||
const response = await got.get(baseURL + 'api/' + ctx.params.channel || '');
|
||||
|
||||
Reference in New Issue
Block a user