Blog category

Troubleshooting

Fixes for specific errors we have hit and reproduced on real projects. Every post states the versions it was tested on, the root cause, the fix, and how to prove the fix worked.

35 articles

12 min read· October 2026

Gateway, bank and ledger do not reconcile: find and fix the mismatch

When your gateway report, bank statement and ledger disagree, the money is almost never lost: it is miscategorised. A fast diagnostic path to find the mismatch by type, trace it to a single transaction, fix it safely, and stop it recurring.

Read article
11 min read· October 2026

Failed and declined payments: recovery, retries and smart dunning

Most failed payments are recoverable, but only the right ones and only if you retry them well. Which decline codes to retry, how to time retries, how to build dunning emails that work, and how to recover subscription revenue without annoying customers or triggering fraud blocks.

Read article
11 min read· October 2026

Customers charged twice: stop duplicate payments with idempotency

A customer charged twice is almost always a retried request, a double-clicked button or a replayed webhook. Refund the duplicate today, then make it impossible: an idempotency key on every payment request and a unique constraint in the database that rejects the second write.

Read article
11 min read· October 2026

Fintech app cannot handle transaction volume: scaling the money path

When a fintech app stalls under load, the bottleneck is usually a hot row, a synchronous external call or an unindexed ledger query, not raw traffic. How to find the real limit on the money path and scale it safely, without ever risking a double-count.

Read article
11 min read· October 2026

The ledger is out of balance: audit, trace and repair it safely

When debits and credits stop agreeing, do not guess and do not edit history. Binary-search for the day it broke, trace it to the unbalanced entries, correct it with an adjusting entry, and add a database check so an unbalanced transaction can never commit again.

Read article
10 min read· October 2026

Migrating a fintech database without losing or double-counting money

A fintech migration has one rule above all: the money must be exactly the same on the other side. How to reconcile control totals before and after, keep integer units intact, make every step reversible and idempotent, and cut over without double-counting or losing a cent.

Read article
11 min read· October 2026

HealthTech App Slow at Clinic Peak Hours? Diagnose and Fix It

A HealthTech app that crawls at 9am clinic rush almost always has a slow database path, not a slow server: missing indexes, N+1 queries, a connection-pool ceiling or an uncached dashboard that recomputes on every load. This post shows how to find the cause in an hour with a health-check route and query logs, the fixes in order, and how RAITHub would fix it. Engineering guidance only.

Read article
10 min read· October 2026

The EHR/FHIR Integration Broke: Diagnose and Recover It

When an EHR or FHIR integration breaks, it is usually one of five things: an expired token or OAuth change, a schema or profile change at the EHR, a rate limit or outage, a silent data-mapping error, or an environment mismatch after deploy. This post shows how to tell which, how to recover without losing or duplicating records, and how to stop it recurring. Engineering guidance; keep patient data in your covered cloud.

Read article
12 min read· October 2026

EdTech App Crawls During Exam Season: Surviving the Concurrency Spike

An EdTech app that is fine all term and dies at exam time has a concurrency problem, not a traffic problem: hundreds of students arrive in the same five minutes and hit the same few queries. Diagnose the slowest query, cap the connection pool, move grading off the request, and load-test the real exam shape.

Read article
10 min read· October 2026

Students Are Cheating the Online Exam: Integrity Fixes That Work

When students cheat an online exam, work out how first: shared answers, reused attempts, a changed clock, or help from another device. The fixes that work reduce what cheating gains, randomise papers, enforce the timer and attempts on the server, and log everything. Browser lockdown and AI proctoring help far less than vendors suggest.

Read article
11 min read· October 2026

EdTech Payments Keep Failing in Emerging Markets: Diagnose and Fix

When course payments fail in emerging markets, most failures are ordinary: a short balance, a timed-out wallet push, or a callback that never arrived. Diagnose by method and country, confirm every payment server-to-server, reconcile pending attempts on a schedule, and make retries safe so a slow payment is never charged twice or left unpaid.

Read article
12 min read· October 2026

Online Store Is Slow and Losing Sales: Diagnose and Fix It

A slow store loses buyers before they reach the cart. How to measure it with Core Web Vitals on real visitors, split the slowness into front end, server and third-party scripts, find the one that is actually costing you sales, and fix the biggest cause first.

Read article
11 min read· October 2026

Carts Converting but Checkouts Failing: Finding the Drop-Off

When carts fill but checkouts fail, the loss is at one specific step. How to add a funnel event to every checkout step, read where buyers vanish, tell ordinary friction from an actual bug or error, reproduce the failing step, and fix it so the next deploy cannot break it again.

Read article
11 min read· October 2026

You Oversold Stock You Do Not Have: Recover, Then Prevent It

An oversell incident has two halves: the mess you have now, and the race condition that caused it. The first hour, how to find every affected order from the data, how to decide who to honour and how to tell them, then the transaction-level fix and the test that proves it cannot happen again.

Read article
11 min read· October 2026

Surviving Black Friday: Load-Proofing a Store Before the Spike

The time to find out a store falls over at 10x traffic is before the sale, not during it. How to model the spike, run a k6 load test against a staging copy, find the real bottleneck (usually the database or checkout), protect the stock and payment path, and keep a rollback plan ready.

Read article
11 min read· October 2026

Property Portal Slow With Thousands of Listings: Diagnose and Fix

A property portal that was fast with 200 listings often crawls at 20,000. The three usual causes are deep OFFSET pagination that scans the whole table, filters with no matching index, and one query per card on the results page. How to tell which one you have, and the keyset pagination and composite index that fix the first two.

Read article
10 min read· October 2026

Double-Booked Viewing or Unit: Fixing the Race Condition

A double-booked viewing or a unit let to two tenants is almost always a race condition: two requests check availability at the same moment, both see it free, and both write. Application checks cannot prevent it under load. The reliable fix is a database-level guarantee, a Postgres exclusion constraint, so two overlapping bookings can never both commit.

Read article
10 min read· October 2026

Rent Payments Silently Failing: Diagnosing the Money Path

When rent payments fail silently, the money path and your records have drifted apart. The usual causes are webhooks that never arrive or arrive twice, events processed out of order, and no reconciliation against the provider. How to trace a single payment end to end, make webhook handling idempotent, and reconcile daily so a gap can never hide.

Read article
10 min read· October 2026

Scaling a Property Platform to Multiple Cities and Markets

A property platform built for one city rarely scales cleanly to many. What breaks first is usually assumptions baked into the code: a single currency, one address format, one timezone, and a database where every query silently means one market. How to make market a first-class dimension in the data model, and what currency, locale and data-residency work each new market adds.

Read article
13 min read· October 2026

Your SaaS Gets Slow as Customers Grow: Where to Look First

A SaaS that was fast at launch and crawls at a few hundred customers is almost always hitting the database, not running out of servers. The order to diagnose it: measure which requests are slow, read the slow-query log, fix N+1 queries and missing indexes, cache what repeats, and only then add hardware. Real SQL and the fixes that come first.

Read article
12 min read· October 2026

You Inherited a SaaS Codebase: Audit It Before You Change Anything

You now own a live SaaS someone else built, with paying customers and no one who wrote it. The safe first week is not new features: secure the accounts, make the build reproducible, find the writes that can lose data and the queries that can leak one tenant into another, and pin current behaviour with tests before you touch a line. A risk-ordered checklist, so you stabilise it instead of breaking it.

Read article
11 min read· October 2026

The Checkout Bugs Quietly Killing Your E-Commerce Sales

A failing checkout rarely throws an error you see; it just loses the sale. The common silent bugs (double charges, stuck spinners, webhooks that never fire, oversold stock, mobile breakage), what each one costs, and the Playwright and webhook tests that catch them before your customers do.

Read article
10 min read· October 2026

Testing Inventory and Order Sync Across Channels (No Overselling)

Selling the same stock on a website, a marketplace and in a shop means inventory sync, and sync is where overselling hides. The race conditions and duplicate updates that cause it, how to make sync idempotent, the reconciliation that catches drift, and the SQL and tests that prove you never oversell.

Read article
11 min read· October 2026

Cart and Wishlist Persistence Bugs That Quietly Lose Sales

A cart that empties on login, a wishlist that vanishes on a new phone, a merge that doubles quantities: these lose sales silently because no error is thrown. The four persistence bugs, where each comes from, and the Playwright tests that reproduce and then guard against them.

Read article
15 min read· October 2026

Stripe Webhook Not Firing, or Returning 405: A Checklist

A step-by-step checklist for a Stripe webhook that never arrives or fails: reading the Event deliveries tab, what 3xx, 401, 404, 405, 400 and 500 mean on a Next.js App Router route, raw-body signature checks, test vs live endpoints and secrets, and forwarding with the Stripe CLI.

Read article
12 min read· October 2026

Next.js 16 proxy.ts (Middleware) Not Running: The Fixes

In Next.js 16, middleware.ts became proxy.ts. When the proxy silently does nothing, the cause is almost always one of five things: where the file sits, what it exports, a matcher that never matches, a runtime setting proxy does not accept, or a deploy target that does not support it. Each check, with the proxy this site runs and how to prove it works.

Read article
12 min read· October 2026

Next.js Sitemap and Canonicals Pointing at the Wrong Domain: The Fix

When a Next.js sitemap, robots.txt and canonical tags point at the wrong host, the cause is usually a stale NEXT_PUBLIC_SITE_URL, frozen into the build. How it happened on this site, how to check yours with curl, and the small host allow-list that stops a stale value ever reaching indexed markup again.

Read article
15 min read· October 2026

Stripe Webhook Returned 200 but the Subscription Didn't Update

Why a Stripe webhook can return 200 while your database stays wrong: handlers that swallow errors, older events overwriting newer ones, updates that match no row, event IDs recorded too early, and fields that moved in API 2025-03-31.basil. With a processor that fails loudly and tests that keep it fixed.

Read article
13 min read· October 2026

Soft 404s in Next.js: Why loading.tsx Makes Unknown Pages Return 200

A root app/loading.tsx wraps every route in a Suspense boundary, so Next.js streams a 200 status before notFound() can run and unknown URLs become soft 404s. How we found it on this site, why it happens, the fix (scope loading.tsx to the routes that need it), and how to prove the status with curl on a production build.

Read article
15 min read· October 2026

App Works Locally but Breaks in Production: 12 Causes, in Order

Why an app, often one built with an AI tool, works on localhost and breaks after deploy: 12 environment differences in the order to check them, from environment variables, dev versus production builds, CORS and auth redirect URLs to serverless timeouts, Node versions, case-sensitive paths and the install command, with the fix and the proof for each.

Read article
16 min read· October 2026

A Database Migration Broke Production: Recover, Then Prevent It

What to do when a database migration takes production down: the first 15 minutes, how to tell a lock problem from a schema or data problem, when to roll back, forward-fix or restore, then how expand-contract migrations and CI migration checks stop it happening again. PostgreSQL examples throughout.

Read article
13 min read· October 2026

Why Is My Shopify Store Slow? Apps, Themes and Core Web Vitals

The four usual reasons a Shopify store is slow (render-blocking app scripts, heavy themes, badly loaded images and slow Liquid), how to read LCP, INP and CLS in Shopify's web performance report, how to find which app is to blame, and the order to fix things in.

Read article
14 min read· October 2026

Supabase Auth Fails After Deploying to Vercel: Redirect URLs, Cookies, Env

Why Supabase auth works on localhost and breaks after deploying to Vercel, in the order to check: the Site URL still set to localhost, missing redirect URLs and preview wildcards, email templates using the wrong variable, OAuth callback settings, the PKCE code exchange, session cookies in a Next.js proxy, and environment variables baked in at build time.

Read article
11 min read· September 2026

Zod 4 .partial() Keeps .default() Values — and Can Wipe Your Data

In Zod 4, .partial() still applies .default() values to fields you leave out. Used for PATCH-style updates, that silently overwrites columns. Here is how we found it, the fix, and the test that keeps it fixed.

Read article
9 min read· September 2026

Fixing npm ERESOLVE: next-auth 4 and nodemailer 10 on Vercel

Our Vercel deploy failed with npm ERESOLVE after a security upgrade moved nodemailer to v10. Here is why it passed locally, why downgrading was the wrong fix, and the scoped npm overrides entry that solved it.

Read article