bug900668 - Placed check for error ahead of check for response