return error if no subreddit is invalid
This commit is contained in:
parent
06912d0a77
commit
d2f207a0e0
@ -63,7 +63,10 @@ class CommunityHandler implements HttpHandler {
|
||||
try {
|
||||
submissions = this.api.getSub(pathArray[4]);
|
||||
} catch (RedditParseException e) {
|
||||
responseJSON.put("error", "invalid subreddit");
|
||||
sendResponse(t, responseJSON.toString());
|
||||
e.printStackTrace();
|
||||
return;
|
||||
}
|
||||
assert submissions != null;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user