API Integration in React Native

How can you implement error handling in API integration?