← Back to journal
May 8, 2026·4 min read·Incident

2 AM, a NaN, and a quiet airplane

The lesson score chart was rendering NaN coordinates. Every chart on every student detail page was crashing the React tree silently. I had not been watching Sentry. I found it by walking all 28 routes by hand.

By David Sawires
Share

The lesson score chart was rendering NaN coordinates. Every chart on every student detail page was crashing the React tree silently. Sentry was screaming. I had not been watching Sentry.

I found it walking all twenty-eight routes by hand at 2 AM. The methodical kind of debugging that pilots are good at — when something is off, you don't panic, you scan. Airspeed. Altitude. Heading. Vertical speed. Trim. You catch it on the gauges before you feel it in the seat.

Same idea. I scanned each page. The chart was the leak.

Aviation has a doctrine that fits software: aviate, navigate, communicate. In an emergency, fly the airplane first. In a production bug, restore the build first.

The postmortem

What I learned that night is now permanent doctrine. Three rules:

One. Type checks can't catch SVG NaN coords. The compile passes; the runtime explodes. The lesson is that for service workers, middleware, layout hooks, column drops, shared modules, charts, and multi-commit batches — preview-deploy click-through is mandatory. The preflight checklist is not optional for charts.

Two. Sentry alerts in production go to a place I check daily, not weekly. I migrated alerts and bought UptimeRobot the next morning.

Three. When a customer reports a crash, the first question is "what does your browser console say." Not "let me look at the code." The browser is the source of truth.

What it cost

Four hours of sleep and one significant ego dent. What it bought: a checklist that has prevented every similar incident since.

There's a saying in aviation training that good judgment comes from experience, and experience comes from bad judgment. Same in shipping software. The NaN crash was bad judgment. The postmortem was the experience.

Share