RedditSharp-DEPRECATED- icon indicating copy to clipboard operation
RedditSharp-DEPRECATED- copied to clipboard

Bad handling of posts in banned Subreddits - GetThingByFullnameAsync

Open zmarty opened this issue 7 years ago • 1 comments

When I call GetThingByFullnameAsync(postId) using a Post ID from Subreddit that was banned I get an unhelpful error: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.

Example Post ID: t3_7a9g4o (https://www.reddit.com/r/Incels/comments/7a9g4o/suicide_fuel_for_dickcels_youre_just_not_good/)

It would be good if the call would either return null, or throw a more reasonable Exception. I prefer the first option.

zmarty avatar Nov 16 '17 18:11 zmarty

I've done some testing and this appears to also happens in any place where you don't have access to view the thing.

jkrejcha avatar Aug 13 '19 20:08 jkrejcha