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 {
|
try {
|
||||||
submissions = this.api.getSub(pathArray[4]);
|
submissions = this.api.getSub(pathArray[4]);
|
||||||
} catch (RedditParseException e) {
|
} catch (RedditParseException e) {
|
||||||
|
responseJSON.put("error", "invalid subreddit");
|
||||||
|
sendResponse(t, responseJSON.toString());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
assert submissions != null;
|
assert submissions != null;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user