### Apache Airflow version

2.2.0

### Operating System

Debian buster

### Versions of Apache Airflow Providers

_No response_

### Deployment

Astronomer

### Deployment details

astro dev start

### What happened

When I have tried to duplicate a connection first time it has created a connection with hello_copy1 and duplicating the same connection second time giving me an error of 
```Connection hello_copy2 can't be added. Integrity error, probably unique constraint.```




### What you expected to happen

It should create a connection with name hello_copy3 or the error message should be more user friendly.

### How to reproduce

https://github.com/apache/airflow/pull/15574#issuecomment-912438705

### Anything else

Suggested Error 
```
Connection hello_copy2 can't be added because it already exists.
```
or
Change the number logic in _copyN so the new name will be always unique.


### Are you willing to submit PR?

- [ ] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

airflow/www/views.py
.join(DagRun, DagRun.execution_date == TaskFail.execution_date)
            .filter(DagRun.execution_date == dttm, TaskFail.dag_id == dag_id)
        )
        tasks = []
        for ti in tis:
            
            
            
            try_count = ti.prev_attempted_tries if ti.prev_attempted_tries != 0 else ti.try_number
            task_dict = alchemy_to_dict(ti)
            task_dict['end_date'] = task_dict['end_date'] or timezone.utcnow()
            task_dict['extraLinks'] = dag.get_task(ti.task_id).extra_links
            task_dict['try_number'] = try_count
            tasks.append(task_dict)
        tf_count = 0
        try_count = 1
        prev_task_id = ""
        for failed_task_instance in ti_fails:
            if tf_count != 0 and failed_task_instance.task_id == prev_task_id:
                try_count += 1
            else:
                try_count = 1
            prev_task_id = failed_task_instance.task_id
            tf_count += 1
            task = dag.get_task(failed_task_instance.task_id)
            task_dict = alchemy_to_dict(failed_task_instance)
            end_date = task_dict['end_date'] or timezone.utcnow()
            task_dict['end_date'] = end_date
            task_dict['start_date'] = task_dict['start_date'] or end_date
            task_dict['state'] = State.FAILED