Case study
The Null That Cascaded Through Six Microservices
A minor refactor in one service changed an empty array to null. Nothing crashed. Nothing alerted. But for three days, 8% of customers saw a blank analytics dashboard — and nobody knew why.
The support ticket was filed on a Thursday afternoon: "Dashboard shows no data since Monday." The customer had attached a screenshot — a row of charts, all flat-lined to zero, as if their business had simply stopped existing.
My client ran a B2B analytics platform. Around 2,000 customers, mostly mid-size e-commerce companies who relied on the dashboard for real-time metrics: orders, revenue, conversion rates. The platform was built on a microservices architecture — fourteen services total, six of them in the pipeline that fed the dashboard.
The on-call engineer checked the reporting service. It was healthy. Returning 200s, responding within SLA. The data it returned was technically valid. It just contained... nothing. Empty arrays where there should have been time-series data.
The first red herring
The initial instinct was to blame the data warehouse. Someone ran a query directly against the underlying Postgres database and found the data was there — complete, up to date, correctly aggregated. So the data existed. The reporting service just wasn't finding it.
The team spent Thursday evening and most of Friday investigating the reporting service. They checked query parameters, pagination logic, caching layers. Everything looked correct. The service was doing exactly what it was supposed to do. It was faithfully returning whatever the upstream enrichment service gave it.
Which was nothing.
Following the null upstream
The enrichment service sat between the raw data layer and the reporting API. Its job was to take raw metric rows, join them with customer configuration (which widgets to show, what date range, what granularity), and pass enriched payloads to the reporting service.
When we looked at what the enrichment service was receiving from the customer-config service, we found the problem. The dashboard_widgets field — which should have been an array of widget configuration objects — was null.
Not an empty array. Not a missing field. null.
The enrichment service had a function that iterated over dashboard_widgets to build the query. When the array was null, the iteration simply never happened. No error, no log, no exception. The function returned an empty result, which propagated downstream through four more services until it arrived at the customer's browser as a perfectly valid, perfectly empty dashboard.
Why it happened
The customer-config service had been refactored the previous Friday. A developer had consolidated two database queries into one and changed the ORM mapping for the response. The old code used a COALESCE in the SQL to ensure the dashboard_widgets column always returned [] when no widgets were explicitly configured. The new code relied on the ORM's default serialization, which mapped a SQL NULL to a JSON null.
The change passed code review. It passed unit tests — because the tests all used customers who had widgets configured, so the field was never null. It passed integration tests in staging, for the same reason: every test customer had a fully configured dashboard.
In production, roughly 8% of customers had never customized their dashboard. They used the platform defaults, which meant the dashboard_widgets column in the database was NULL. Those were the customers whose dashboards went blank.
Why nobody noticed for three days
This is the part that stuck with me. Eight percent of customers lost their entire dashboard for three days, and the first alert came from a support ticket, not from monitoring.
Here's why: every service in the chain was returning 200 OK. Response times were normal. Error rates were zero. The data flowing through the pipeline was structurally valid — it was just empty. From the perspective of every health check, every dashboard, and every alert rule, the system was operating perfectly.
The monitoring was built to catch failures. It was not built to catch the absence of data.
After the incident, we added two things. First, a check in the enrichment service that compared the number of customers with non-empty dashboard payloads against a trailing seven-day average. If it dropped by more than 5%, an alert fired. Second — and this was the more important change — contract tests between services.
The fix that mattered
We could have patched the customer-config service to add the COALESCE back. That would've fixed this specific bug. But the real issue was that six services in a chain all silently accepted and forwarded a null value that none of them should have treated as valid input.
// Before: trusting upstream blindly
const widgets = customerConfig.dashboard_widgets;
const metrics = widgets.map(w => buildQuery(w));
// After: validating at the boundary
const widgets = customerConfig.dashboard_widgets;
if (!Array.isArray(widgets)) {
logger.warn('customer-config returned non-array widgets', {
customerId,
receivedType: typeof widgets,
});
throw new UpstreamContractError('dashboard_widgets must be an array');
}
const metrics = widgets.map(w => buildQuery(w));The team also adopted contract tests using Pact. Each consumer service defined what it expected from each provider. If the customer-config service ever changed dashboard_widgets from an array to something else, the contract test would fail before the code reached production.
Note
What I took away
Distributed systems fail in distributed ways. That's not a new observation, but this incident drove home a specific flavor of it: the silent cascade. No circuit breaker tripped. No retry storm happened. No service crashed. A single null value drifted through six services like a ghost, and each one politely passed it along.
The hardest bugs to catch are the ones where the system is working correctly — just on the wrong data. If your monitoring only checks whether services are up and fast, you'll catch outages. You won't catch the slow bleed of customers quietly getting nothing.
What's your approach for catching these kinds of "everything is fine but actually nothing is working" failures? I still don't think there's a clean general solution.