X_SEARCH_UNDECLARED
Means
this entity has no searchable column
Typical cause
a matches predicate on an entity whose columns declare no .searchable(), so there is no tsvector to match against. Raised where the STATEMENT would be built and not where the chain was written, because both drivers reach it: a search vector is derived from the entity's own columns, so there is nothing else the predicate could name and no vector to guess at. 500 and not a 4xx — nothing the caller sends changes the answer, and the repair is an edit to the entity
Fix
add .searchable() to a text() column of <entity>, then: x db gen "search <entity>"