Finding · affects your reliability

Third-party APIs called inside requests

Every third-party API your request waits on adds its slow moments and outages to yours.

Why it matters

Payments, email, analytics and enrichment APIs all have bad minutes. When your handler waits on them, their slowest one percent becomes yours, and an outage on their side becomes an outage on yours, often with no timeout to end the wait.

What it looks like

A request that waits on two outside services:

Before
export async function POST(req: Request) {
  const user = await createUser(req);
  await crm.contacts.create(user);      // no timeout
  await email.send(welcome(user));      // could be a background job
  return Response.json(user);
}

How to fix it

  1. Set an explicit timeout on every client.
  2. Retry with backoff where it's safe, and stop calling a failing service for a while (circuit breaking).
  3. Move calls the user doesn't need to wait for (email, CRM, analytics) to a background worker.

A real example: Dub

Computed by Skeram’s engine from the published teardown of Dub, at 100,000 monthly users (critical):

10 third-party APIs are called inline with requests. stripe, resend (@dub/email), google/github oauth (next-auth), cloudflare-r2, unsplash… sit in the request path. Any of their p99 spikes becomes your p99 spike; without timeouts and retries with backoff, their outage is your outage.

Suggested fix: Set explicit timeouts on every client, add circuit breaking, and move non-interactive calls (email, analytics) to the worker.

Evidence: app/api/workspaces/[idOrSlug]/billing/activate-paid-plan/route.ts, lib/auth/options.ts:94-104, app/api/auth/reset-password/route.ts.

How Skeram detects it

The extraction records each external service and whether requests wait on it. Non-AI services in the request path are flagged; model calls have their own finding.

When it starts to hurt: A warning from about 10,000 monthly users, critical around 100,000.

Every finding cites the file and line it came from, and scanning again after a fix shows it resolved in History. How the analysis works.

Related findings

Find it in your code

Skeram reads your repo, prices every model call from 100 to 100,000 users, and flags these patterns with the file and line.