Azure / Azure/data-api-builder
[Bug]: `/health/check` and other subpaths return 400 instead of 404
Open
2.x
health-endpoint
- Dominant language
- C#
- Stars
- 1.5k
- Forks
- 370
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 8
Description
Requesting subpaths like `/health/check` or `/health/health` returns **400 Bad Request** with a REST controller error instead of **404 Not Found**.
## Expected
```
GET /health/check → 404 Not Found
GET /health/health → 404 Not Found
```
## Actual
```
GET /health/check → 400 Bad Request
Body: {"error":{"code":"BadRequest","message":"Invalid Path for route: health/check.","status":400}}
```
These requests fall through to the REST controller's catch-all route, which tries to interpret `health/check` as an entity path. The error logs show `DataApiBuilderException: Invalid Path for route: health/check`.
Contributor guide
Assessment
This issue has not been assessed yet.