feature(api): descriptive error for invalid domain names

pull/508/head
Alexander Klein 2021-02-24 16:22:03 +01:00
parent c6c6ef1e8f
commit a2f36e7ef2
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ export default async (req, res) => {
const { id, type, start_at, end_at, domain, url } = req.query;
if (domain && !DOMAIN_REGEX.test(domain)) {
return badRequest(res);
return badRequest(res, 'error.bad-domain\tInvalid domain name - please check settings');
}
const websiteId = +id;