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:
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
- Set an explicit timeout on every client.
- Retry with backoff where it's safe, and stop calling a failing service for a while (circuit breaking).
- 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
- Unauthenticated routes that use your users' stored API keys: If users save their own model API keys in your app, a route that uses them without checking who's calling lets strangers spend your users' money.
- Background jobs that run inside requests: Work fired off from a request handler without a queue dies on deploys and crashes, never retries, and competes with live requests for the same server.
- Webhooks processed synchronously: A webhook handler that does its work before responding makes the sender retry under load, which doubles the traffic on an already slow handler.
- Database connection pools on serverless: On serverless hosting every concurrent function instance opens its own pool, so the total quickly exceeds what the database allows.
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.