How do you handle rate limits and errors when calling AI APIs on the frontend · InterviewLane