Azure / Azure/data-api-builder

[Bug]: Bad connection string health check shows "threshold exceeded" instead of connection error

Open
#3,571 0 comments 0 reactions 0 assignees View on GitHub
2.x health-endpoint
Dominant language
C#
Stars
1.5k
Forks
370
Avg merge
3d 17h
Merged PRs (30d)
8

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.