Restructure errors for bad page updates

This commit is contained in:
ewin 2025-07-29 20:06:26 -04:00
parent e3fd6ae47f
commit 7fac86adbb
Signed by: erin
SSH key fingerprint: SHA256:swjoHhREbZPbWe+gyJNi24d4NAxJSyUIm3fpZj4z3wc

View file

@ -48,9 +48,6 @@ function insertInfoboxEDBID (pageContent, edbID) {
return pageContent.replace(existingReleaseParameter, `$&\n$1|$2id-edb$3=$4${edbID}`)
}
console.group('Bad page content:');
console.log(pageContent);
console.groupEnd();
throw new Error('Dunno how to insert the parameter into this page');
}
@ -81,8 +78,11 @@ for (const {title} of itemPagesWithoutEDBIDs) {
updatedText = insertInfoboxEDBID(originalText, edbID);
diff(originalText, updatedText);
} catch (error) {
console.log(error);
console.log('not doing anything with this item');
console.log('Error inserting parameter:', error);
console.group('Bad page content:');
console.log(pageContent);
console.groupEnd();
console.log();
continue;
}