HTML import: Improve log message for invalid HTML
parent
c816c20bc7
commit
118c66e5d0
|
@ -46,11 +46,9 @@ exports.setPadHTML = async (pad, html) => {
|
||||||
try {
|
try {
|
||||||
// we use a try here because if the HTML is bad it will blow up
|
// we use a try here because if the HTML is bad it will blow up
|
||||||
cc.collectContent(document.body);
|
cc.collectContent(document.body);
|
||||||
} catch (e) {
|
} catch (err) {
|
||||||
apiLogger.warn('HTML was not properly formed', e);
|
apiLogger.warn(`Error processing HTML: ${err.stack || err}`);
|
||||||
|
throw err;
|
||||||
// don't process the HTML because it was bad
|
|
||||||
throw e;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = cc.finish();
|
const result = cc.finish();
|
||||||
|
|
Loading…
Reference in New Issue