Notch interview question

How would you handle a situation where an API endpoint randomly fails?