You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The occurrence of a fragment like this on the console:
(node:4681) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 623)
Where in the code
Calls in handlers/request-handler.js and handlers/content-negotiation-handler.js, in situations that deal with a previous error. Found on the development branch:
Wrap each call in a code snippet like this one (or put this code in a wrapper function)
let html;
try {
html = await HTMLConverter.convert(htmlInfo, data);
} catch (error) {
if (logger) {
logger.warn('Empty HTML returned, because HTML conversion failed: ' + error.message);
}
html = '';
}
Symptoms
Where in the code
Calls in handlers/request-handler.js and handlers/content-negotiation-handler.js, in situations that deal with a previous error. Found on the development branch:
walder/lib/handlers/request-handler.js
Lines 44 to 49 in 5205e36
walder/lib/handlers/request-handler.js
Lines 65 to 71 in 5205e36
walder/lib/handlers/request-handler.js
Lines 79 to 84 in 5205e36
walder/lib/handlers/request-handler.js
Lines 86 to 89 in 5205e36
walder/lib/handlers/content-negotiation-handler.js
Lines 81 to 86 in 5205e36
How to test (example, not covering every call listed)
http://localhost:3000/thisPageSurelyWontExist
http://localhost:3000/bad_pipeModule
http://localhost:3000/bad_query
Proposed solution
Do both:
walder/lib/converters/html-converter.js
Lines 39 to 46 in 5205e36
into this code (this avoids extra code in the code snipped above)
The text was updated successfully, but these errors were encountered: