Closed nnnikolay closed 7 years ago
Good find, we should handle that better!
Also, try returning that second promise created with the page.html()
... and one more note in wiki.js
in the page
function you do this
const id = Object.keys(res.query.pages)[0];
if (!id) {
The problem is, sometimes (especially when there is no such page) there will be "-1"
in id, therefore throw
will not happen
Hi there,
What is the best practice to handle the case when requested page does not exist?
In this case, I see following message:
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'revisions' of undefined
for example: