This fix also works with pull request #305 by @buddydvd.
This is better than 500'ing, but I feel like some sort of error condition needs to be communicated back to the client
Agreed, though POST_subscribe has the @noresponse form handler. I didn't want to break other things by changing that. Suggestions?
Now that I'm looking at other @noresponse functions, it seems some of them also do not check to make sure the object actually exists ((un)mark_nsfw) and others, like my fix, simply return without any warning if the object is not valid. One option is to return 404 errors in place of failure, and 200 when the action actually was performed successfully.
I didn't notice the @noresponse part. I guess @spladug or @chromakode would be best to ask how to approach - 404 seems ok, but since there's precedent for simply returning without warning, that's probably ok as well.
For v2 of the API, the Amazon S3 error handling method would be a good model to follow, with json instead of xml of course :).
Fix 500 error when attempting to subscribe to a non-existent subreddit.
Merged as 05062bf. Thanks!