Urgent.News

What's breaking now, across thousands of outlets.

Tech

Our review prompt showed to nobody for 57 days, because the driver camelCases every column a raw query returns

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…

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.

The 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.

Interestingly, 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.

The 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.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Hosting Several Client Apps on One VPS with Docker, Nginx and GitHub Actions

Most small agencies and freelancers end up in the same place: a pile of small client projects. A Next.js marketing site here, a Laravel admin panel there, a Node API for a mobile app, a couple of…

  • Agencies and freelancers manage multiple client projects.
  • Run several small apps on a single VPS using Docker Compose.
  • GitHub Actions automate deployments for simplicity and debugging.

'Zionist regime's false flag': Iran warns France over supermarket cyberattack

'Zionist regime's false flag': Iran warns France over supermarket cyberattack Submitted by MEE staff on Sun, 11/15/2026 - 08:59 Paris has accused an IRGC-linked cyber unit of targeting refrigeration…

  • France accuses Iran of cyberattacks on supermarkets, causing damage and food loss
  • Iran's IRGC spokesman calls French allegations "ridiculous" and denies targeting civilians
  • France summons Iran's ambassador and threatens new sanctions over the alleged false flag operation

Wisp - A fast, fun web framework for Rust

Hi, I built Wisp, a web framework for Rust. Here is a 90-second video of it: https://www.youtube.com/watch?v=g0LPPzrQux8 The idea: a folder is a URL, and its +page.wisp file is the page.

  • Wisp is a fast, user-friendly web framework for Rust
  • Enables URL-based folder structure and .page.wisp file generation
  • Single binary packaging with server-side validation and reactivity

Apple’s OLED iPad mini 8: Design, Specs, and Impact

Apple’s latest tablet, the OLED iPad mini 8, arrives as the most substantial refresh the mini line has seen in 14 years. While the device retains the familiar 8‑inch footprint, Apple has shaved off a…

  • iPad mini 8 features OLED display for superior contrast and color
  • Device is 5.4 mm thick, lightest iPad at 255 grams
  • Powered by A20 Pro chip, starts at $699 for 128 GB model

More from Sunday 15 November →