discriminate between query and system error.