Azure / Azure/data-api-builder

[Bug]: `/health/check` and other subpaths return 400 instead of 404

Open
#3,566 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

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

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.