Error Handling In Api Requests