Azure / Azure/data-api-builder
[Bug]: Bad connection string health check shows "threshold exceeded" instead of connection error
- Lingua principale
- C#
- Stelle
- 1.5k
- Fork
- 370
- Merge medio
- 3g 22h
- PR unite (30g)
- 9
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia individuando il punto di ingresso dell’health check della fonte dati e la gestione che trasforma una connessione SQL non riuscita nel messaggio di soglia. Riproduci quindi il caso di un server inesistente, poi verifica che la risposta dell’health check conservi un’eccezione relativa alla connessione, mentre i dati della soglia rimangano presenti per le richieste effettivamente lente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp, sql
- Ambito
- databases, observability
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 58/100