Let’s explore a challenge—if your Python script from the previous question fails due to an API timeout or malformed JSON, how would you handle these exceptions and ensure the script still runs reliably?