error handling for client['apId']