Azure / Azure/data-api-builder
[Bug]: Bad connection string health check shows "threshold exceeded" instead of connection error
- Lenguaje dominante
- C#
- Estrellas
- 1.5k
- Forks
- 370
- Merge medio
- 3 d 22 h
- PR fusionados (30 d)
- 9
Descripción
When the data source connection string points to a non-existent server, the health check reports `"The threshold for executing the request has exceeded."` instead of a connection error.
Operators monitoring health endpoints cannot determine the root cause of an Unhealthy status. A threshold exceeded vs. connection failure require very different remediation actions.
## Expected
The health check should report a connection-related exception, e.g.:
```json
{
"status": "Unhealthy",
"name": "primary-sql-db",
"exception": "A network-related or instance-specific error occurred while establishing a connection to SQL Server.",
"tags": ["data-source"]
}
```
## Actual
```json
{
"status": "Unhealthy",
"name": "primary-sql-db",
"exception": "The threshold for executing the request has exceeded.",
"tags": ["data-source"],
"data": {"response-ms": 137, "threshold-ms": 1500}
}
```
The actual connection failure gets swallowed and replaced with a generic threshold message. This makes it impossible to distinguish between "database is slow" and "database is unreachable" from the health response alone.
Guía de contribución
Línea de trabajo
Comienza localizando el punto de entrada de la comprobación de salud de la fuente de datos y el manejo que convierte una conexión SQL fallida en el mensaje de umbral. Reproduce el caso de un servidor inexistente y, a continuación, verifica que la respuesta de salud conserve una excepción relacionada con la conexión, mientras los datos del umbral sigan presentes para las solicitudes realmente lentas.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- csharp, sql
- Área
- databases, observability
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 58/100