davidabrahams / Hi-Reddit

Ask Snoo Anything is an Siri-like Android app that answers the user's speech with snarky, hilarious, often not-PC responses from reddit.
0 stars 3 forks source link

volley error? #53

Closed nmohamed closed 8 years ago

nmohamed commented 8 years ago
E/Volley: [129860] BasicNetwork.performRequest: Unexpected response code 400 for https://api.pushshift.io/reddit/search?q=you&fields=body
E/RedditSearcher Error: Volley experienced an error

not sure why i get this since i haven't touched redditsearcher or anything that changes your result. i get it sometimes, seems random. we should also have pregenerated response for us having errors with volley/whatever

nmohamed commented 8 years ago

E/Volley: [129872] BasicNetwork.performRequest: Unexpected response code 400 for https://api.pushshift.io/reddit/search?q=the&fields=body E/RedditSearcher Error: Volley experienced an error

LucyWilcox commented 8 years ago

If you click that link you'll see why we get the error, this is the body: {"error":"{\"error\":\"Search term is too generic (One of the top 100 english words)\"}"}

nmohamed commented 8 years ago

ah, i see. so it's the your word is too simple error. in that case, isn't it suppiosed to give you a result? where you search the entire thing instead? what do we do instead/

LucyWilcox commented 8 years ago

Well the reddit api wont. I think this would be an appropriate time to search a shake word instead.

davidabrahams commented 8 years ago

Eh idk maybe we should tell the user what they said is really generic and they should say something more interesting. Just so they're not like "wtf that has nothing to do with what I said."

On Wed, Dec 9, 2015 at 5:25 PM Lucy Wilcox notifications@github.com wrote:

Well the reddit api wont. I think this would be an appropriate time to search a shake word instead.

— Reply to this email directly or view it on GitHub https://github.com/greneroom/Hi-Reddit/issues/53#issuecomment-163419413.

YuzhongHuang commented 8 years ago

I agree. The user will feel confused if the app is random when the user is not in the mood of random.

LucyWilcox commented 8 years ago

But, if they said "the" or "you" that's basically random, because anything could come up.

nmohamed commented 8 years ago

they're more likely to think it's the fault of the app. plus, you could make a sentence with 5 words and if all of them are in the list of 100 then you get nothing (i can't ask "how are you" - it gives me a volley error since only "you" is the important word) so, let's just tell them "stop being a generic pleb" or w/e

davidabrahams commented 8 years ago

I vote we hardcode a response for generic words.

YuzhongHuang commented 8 years ago

solved in the dead-code-fix