Explicitly throwing an error when the http status used is not 301 or 302
This commit is contained in:
parent
2cadd68506
commit
23d3f063d4
1 changed files with 1 additions and 1 deletions
|
|
@ -33,7 +33,7 @@ async function buildCache(host) {
|
||||||
}
|
}
|
||||||
if(!['301', '302'].includes(httpStatus)) {
|
if(!['301', '302'].includes(httpStatus)) {
|
||||||
httpStatus = '301';
|
httpStatus = '301';
|
||||||
console.warn(`The record "${url}" wants to use the http status code ${httpStatus} which is not allowed (only 301 and 302). Using 301 instead.`);
|
throw new Error(`The record "${url}" wants to use the http status code ${httpStatus} which is not allowed (only 301 and 302)`);
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
url,
|
url,
|
||||||
|
|
|
||||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue