Simplified API error handling.