How would you design an API client layer for retries, pagination, and error handling in a mobile app?