SShortSingh.
Back to feed

Timed-out API fetch silently wrote an empty array, and tests locked in the wrong result

0
·1 views

A developer's scraper reported that a GitHub repository had zero closed pull requests, though it actually had dozens. A curl request with a 25-second limit was cut off mid-transfer on a large response, leaving a partial JSON fragment that the parser failed on. The error was swallowed and an empty array was written to disk, which was then cited as evidence. The author argues the pipeline lacked a way to represent 'unknown' versus 'none', and that tests asserting counts or fixtures captured from live data can pass while hiding such bugs. The article recommends explicit failure signaling, named error details, and tests that assert the specific field that can be wrong.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Cast a Local MKV With Subtitles to Chromecast Directly From Chrome

A guide explains how to stream a local MKV video, with either embedded or separate SRT/VTT subtitles, to a Chromecast or Google TV using only the Chrome browser. The user opens a web app in Chrome, selects the file, configures subtitles, and presses Cast, with the file read locally and sent over the home network rather than uploaded. The article notes that playback stops if the tab closes or the device sleeps, and that large files are streamed in chunks, with limits for files needing conversion. Android users can follow the same steps, with a screen-mirroring fallback available. Troubleshooting advice focuses mainly on network issues, such as guest Wi-Fi isolation blocking device discovery.

0
ProgrammingDEV Community ·

Tool Statically Diffs Electron App Builds to Reveal Security-Relevant Changes

A developer built hexvero, a tool that compares two Electron app.asar bundles without running either build. It links preload-script bridge members to IPC handlers and reports window setting changes such as nodeIntegration and sandbox. Where channel names cannot be resolved statically, it flags them as unresolved rather than guessing or dropping them. The tool is read-only and produces a local web view and Markdown reports, but its findings describe code contents, not exploitability. On a blind test set it found only part of the IPC channels and version changes, and the author publishes those misses.

0
ProgrammingDEV Community ·

PayGuard Local: Offline AI Tool Sorts Freelancer Invoices Into Structured Records

A developer has released PayGuard Local, a desktop utility that uses AI to organize freelancers' invoices and receipts into structured JSON records. The tool runs entirely on the user's machine using Meta's open-weight Llama 3.2 model via Ollama, so client data never leaves the laptop. It is aimed at freelancers, student developers, and small agencies who currently sort bills and log payments by hand. The creator says local inference avoids recurring per-scan API costs and allows users to swap in other models or adapt the schema to local tax formats. The project was submitted to the Hacktoberfest Open-Source AI Challenge and is available on GitHub.

0
ProgrammingDEV Community ·

Two Local-First B2B Mobile Apps Built With Flutter and React 19 with Capacitor 8

VanzaLabs, a two-founder product engineering studio, built two mobile apps for small businesses and independent contractors to demonstrate production-ready software. Both apps follow a Local-First design, with data kept on the user's device or in their own cloud account rather than on intermediate backend servers. FormGrid, built with Flutter, lets users work with Google Forms and Sheets on mobile, with offline sync and ready-made business templates. Vanza, built with React 19 and Capacitor 8, handles invoices and contracts, storing client data in IndexedDB and generating PDFs in multiple templates. The team chose React for Vanza because its complex document layouts and calculations were faster to iterate on than in Flutter.