sourcemash / Sourcemash

Read Your News Faster.
GNU General Public License v2.0
3 stars 0 forks source link

Add try/except for json #318

Closed alexgerstein closed 9 years ago

alexgerstein commented 9 years ago

Closes #317.

alexgerstein commented 9 years ago

There's not much to do to defend against this one since it happens on Wikipedia's end.

swglad commented 9 years ago

Well can we catch the bad return value and just leave no categories then? Not good for the whole scrape/categorize command to fail because of bad input. 

swglad commented 9 years ago

Ah, see you found the line. Kk makes sense.

Is it worth taking a look to see what the possible errors for all Wiki returned values are? We should catch those.

alexgerstein commented 9 years ago

The error was that it didn't return JSON, which should never happen... It's not something that we can "catch" because we won't ever be able to parse it.

alexgerstein commented 9 years ago

Fixed the pr! Ready for your review...