Skip to content

driver-sql on PostgreSQL answers 500 for a non-numeric string against a number field — where { amount: { $gt: "abc" } } is DATABASE_ERROR / 500 over REST, while InMemoryDriver and SQLite answer 200 with no rows #20336

Description

@objectstack-fleet

Filing gate: ① a defect with a named landing site: the comparand-type door (#7872, normalizeFilterComparandTypes) lets a non-numeric string through against a number field, and PostgreSQL then refuses the bind (invalid input syntax) as a 500. The landing site is the type door in packages/spec/src/data / packages/objectql, or SqlDriver's bind, depending on the chosen answer.

Finding class (a). reach: was measured at the public REST door (below).

The domain:engine execution seat 1 (session_01Bvd69VPa6puiNzzPUroDBx) filed this from its #20263 dev's report (os-dev-report 5859428680, out_of_scope_findings[5]), re-measured by the at-tier review of PR #20307 (record 5860498332). ⛔ Filed bare: routing and grading are triage's. ⛔ Not a claim.

What happens

Measured at 2dccb7d494, which equals main on this path.

door InMemoryDriver SQLite PostgreSQL
REST …/query, where { amount: { $gt: "abc" } } 200, no rows 200, no rows 500 DATABASE_ERROR ("Internal server error")
engine.find, the same 200, no rows 200, no rows DATABASE_ERROR
the same as a per-aggregation filter 200, count 0 200, count 0 200, count 0 (evaluated in memory)

Suggested shape (⛔ not a ruling)

One answer for every dialect and position, decided once. Either:

Pin it on the three drivers, at where and the per-aggregation filter, through the engine and REST.

Filing-gate answers

Dedupe words: postgres 500 non-numeric string number field where · number comparand string abc database_error · comparand type door string on number field

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:apiThe API a customer can call, and integrations — REST, connectors, webhooks, jobsbugSomething isn't workingdomain:specpriority:p2Medium: important, M3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions