SShortSingh.
Back to feed

CPSC Product Recall API Has Broken Filters and No Pagination, Developer Finds

0
·1 views

A developer testing the U.S. Consumer Product Safety Commission's public Recalls API on July 20, 2026, found that several documented search filters silently return empty results instead of matching data. The Hazard filter, along with UPC and ManufacturerCountry parameters, consistently returns zero records despite matching data existing in the corpus of 9,905 recall entries. The root cause appears to be that the server-side filter matches against empty internal fields rather than the populated display fields. The API also offers no pagination support, though downloading the entire dataset unfiltered takes under half a second due to its small size. The official programmer's guide, last updated in September 2018, documents these filters as functional without noting any known limitations.

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 ·

How to Set a Clear Production-Readiness Bar for AI Agents Before You Ship

Teams deploying AI agents often struggle to define what 'production-ready' actually means, leading to subjective debates and agents shipped on gut feeling rather than measurable criteria. Unlike traditional services, AI agents are non-deterministic, have open-ended failure modes, and can produce confident wrong answers that are harder to detect than outright crashes. Experts recommend defining four concrete thresholds before building: an acceptable task-success rate, a classification of tolerable versus dangerous failures, a cost and latency ceiling, and a containment plan that limits the damage when the agent errs. Setting these benchmarks after the fact is considered unreliable, as teams tend to rationalize existing performance into acceptable ranges once a working system is in hand. The goal is to replace subjective readiness debates with a written, pre-agreed standard that turns 'is it ready?' into a measurable answer rather than an opinion.

0
ProgrammingDEV Community ·

Tracking Tokens Per Feature, Not Per Model, Is the Key to Cutting LLM Costs

A developer discovered that rising LLM API bills could not be explained by provider dashboards, which only group usage by model, API key, or time period. The real insight came from attributing every LLM call to a specific product feature — such as chat, document summarization, or a reporting agent — rather than looking at total token consumption. By logging structured usage records with fields like feature name, operation type, token counts, and latency, it became possible to pinpoint exactly which part of an application was driving cost increases. This approach revealed actionable problems, such as a classifier receiving an oversized system prompt or an agent repeatedly retrying failed tool calls. The method requires no changes to the model provider and can be implemented with a lightweight logging layer in the application itself.

0
ProgrammingDEV Community ·

React useCookie Hook Turns Browser Cookies into Reactive Component State

A new hook called useCookie, available from the @reactuses/core library, allows React developers to manage browser cookies as reactive state rather than relying on the native document.cookie API. The native API requires manual string parsing, does not trigger re-renders, and can cause hydration mismatches during server-side rendering. With useCookie, components reading the same cookie key stay synchronized within a tab, and updates automatically propagate without extra boilerplate. The hook is built on the js-cookie library, meaning cookie attributes such as expiry, path, and SameSite are handled reliably through a structured options argument. Setting a value to undefined deletes the cookie, and passing a default value ensures the cookie is written on first render, making it immediately available to the server on subsequent requests.

0
ProgrammingDEV Community ·

Extension Blocks in C# 14 Are More Than New Syntax

Extension methods have been part of C# for years. Extension blocks finally make them feel like a small, organized API. Extension methods are one of those C# features that quietly end up everywhere. LINQ depends on them, library authors use them to improve APIs they do not control, and most production codebases eventually collect a few SomethingExtensions classes. The familiar syntax works, but it starts to feel awkward when several related operations target the same type: public static class DateOnlyExtensions { public static bool IsWeekend(this DateOnly date) => date.DayOfWeek is DayOfWeek.Sa

CPSC Product Recall API Has Broken Filters and No Pagination, Developer Finds · ShortSingh