{
  "id": 20166110,
  "title": "Our review prompt showed to nobody for 57 days, because the driver camelCases every column a raw query returns",
  "url": "https://urgent.news/2026/11/15/our-review-prompt-showed-to-nobody-for-57-days-because-the-driver",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-15T11:38:25.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/daniel_pertu/our-review-prompt-showed-to-nobody-for-57-days-because-the-driver-camelcases-every-column-a-raw-1b0j"
  },
  "original_language": "en",
  "account": "The review prompt system of CogniPrep only reached out to customers once, after they had used the product they purchased. The system required at least one completed game, one exercise or one interview for a review to be prompted. This check was performed based on the time since the purchase, not the signup date. The query designed to gather these counts returned incorrect data from September 16 to November 12, leading to zero values being read for all customers.\n\nThe problem stemmed from the column names returned by the Postgres client. After each query, the client transformed column names to camelCase, which conflicted with the Drizzle query builder that read results positionally. As a result, the gate reading column names under the wrong names returned undefined values, which were then coerced to 0 by the Number() function. Consequently, the decision-making process, which relied on these counts, returned a false value for the prompt to be shown.\n\nInterestingly, single-word aliases were not affected by the camelCase transformation, which explains why some data flowed correctly. This led to the four values needed for the decision being all zeros, resulting in the prompt not being displayed to the customers. The issue was silent, with no error logs, exceptions, or Sentry issues, making it hard to detect.\n\nThe root cause was the mismatch between the Postgres client's column transformation and Drizzle's result reading. The fix involved changing the database query to use the correct SQL alias, ensuring the data was returned in the expected format. This change required updating 15 raw db.execute call sites across five files, improving the robustness of the system without adding significant complexity.",
  "summary": "CogniPrep asks a paying customer for a Trustpilot review once, and only once, after they have actually used what they bought. The gate is deliberately small: export const REVIEW_PROMPT_MINIMUMS = { games : 2 , exercises : 1 , interviews : 1 , } as const ; Any one of those clearing its own bar is enough. It is an OR and not a weighted sum, because somebody who has done one full assessment centre…",
  "key_points": [
    "Review prompt system reached customers after product use",
    "Incorrect data from query caused zero values for all customers",
    "Fix involved correcting SQL alias in database query"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}