Implement exceptions based on API response codes.