dijs / wiki

Wikipedia Interface for Node.js
MIT License
313 stars 62 forks source link

Page Method Doesn't Throw Error When Not Found #2

Closed alanjames1987 closed 10 years ago

alanjames1987 commented 10 years ago

When using the page method to get a page that doesn't exist the err variable passed to the callback function doesn't get populated. Instead I get an error saying the pages variable is not defined within wiki.min.js.

alanjames1987 commented 10 years ago

This is the query I used to reproduce this error.

'the slow motion version CSUCI'

dijs commented 10 years ago

I see what you are talking about. Do you have a opinion on how this is handled?

Would you like an error to be thrown with a search text suggestion?

alanjames1987 commented 10 years ago

It would be good if the err variable were an object with a property of suggestion.

However even populating the err variable with a boolean value of true would be good enough.

dijs commented 10 years ago

Awesome, thanks for the input.