Error Handling In Api