throw exception instead of returning null

This commit is contained in:
Nicolas Constant 2022-02-08 20:32:48 -05:00
parent b0e7601333
commit a7b4a4978a
No known key found for this signature in database
GPG key ID: 1E9F677FB01A5688

View file

@ -35,7 +35,7 @@ namespace BirdsiteLive.Twitter
public TwitterUser GetUser(string username)
{
//Check if API is saturated
if (IsUserApiRateLimited()) return null;
if (IsUserApiRateLimited()) throw new RateLimitExceededException();
//Proceed to account retrieval
_twitterAuthenticationInitializer.EnsureAuthenticationIsInitialized();