Improves error handling in RateLimit class