Skip to content

data: unsupported-filter-operator refusal ships without error.code and leaks the [sql-driver] prefix #4436

Description

@baozhoutao

Found while verifying the 17.0.0-rc.1 checklist on #3909 (F3). Verified on main @ 1ee48bc60.

The #4209/#4029 posture itself works — a filter carrying an operator the driver cannot compile is refused instead of matching everything. But the refusal envelope breaks the ADR-0112 contract this train shipped:

GET /api/v1/data/showcase_task?filter={"title":{"$bogusop":"x"}}
→ 400 {"error":"[sql-driver] Unsupported filter operator \"$bogusop\" on field \"title\". Supported operators: $eq, $ne, …"}

Contrast: the same request with a non-AST filter array gets a proper {"code":"INVALID_FILTER"}; only the unsupported-operator branch bypasses the envelope (the driver's thrown message is served raw).

Expected: the unsupported-operator refusal speaks a catalogued code (INVALID_FILTER fits) with the actionable operator list kept in the message/details, and no driver prefix.

Part of the #3909 rc.1 verification (section F3).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions