duckduckgo / zeroclickinfo-spice

DuckDuckGo Instant Answers based on JavaScript (JSON) APIs
https://duckduckhack.com/
Other
548 stars 942 forks source link

Recipe spice needs to handle empty response #1215

Closed bsstoner closed 9 years ago

bsstoner commented 9 years ago

Yummly was just down/returning empty response and our JS was crashing.

Needs to do something like this at the top:

if (!res) {
    return Spice.failed('recipes');
}

https://github.com/duckduckgo/zeroclickinfo-spice/blob/master/share/spice/recipes/recipes.js#L3

bsstoner commented 9 years ago

@moollaza feel free to close/combine with other issue if it's a duplicate.

moollaza commented 9 years ago

@bsstoner thanks! There's no related issues on GitHub for this. I'll tackle this tomorrow.