Added a handle_rate_limit method.