not every API failure is an API problem
DNS fails? Check hostname resolution
TCP fails? Check connectivity
HTTP 401? Check authentication
tools like dig, nc, and curl help identify where things break
debug the failing layer, not your assumptions
#BackendEngineering#DevOps
A Docker image can build successfully but fail at runtime due to file permissions.
Running as root might fix it, but it introduces security risks.
Give the application only the permissions it needs.
#Docker#DevOps
node.js process can die after postgres commits an order but before BullMQ marks the job as completed
job gets retried, you risk creating a duplicate
graceful shutdown helps, but not enough.
Idempotency, database constraints makes retries safer
#NodeJS#BackendEngineering
Stop caring so much about model releases.
Focus on the harness, and improving the environment your agent operates in.
You'll find yourself far ahead of the curve
my whatsapp sales agent just closed its first (test) sale, end to end
ask → order → paystack link in chat → pay → "payment received" on whatsapp
the AI never touches money. the server prices it, paystack makes the link, and every price and link is checked before sending
my whatsapp sales bot can talk back now. it only repeats what you say for now, but the plumbing is real
webhook answers twilio in ms, 3 queues do the work, and if you send "hi" "how much?" "is delivery free?" back to back it waits and replies once.
brain next.
deployed my ai expense tracker's backend today. almost let the host default to sleep when idle to save cost except my background worker runs in the same process as the api, so sleeping it means uploaded statements just sit stuck in the queue. forced it to stay always-on instead.
Moved my expense tracker's file storage off local disk onto cloudflare r2 today local disk doesn't survive a real deploy. spent a while chasing a cryptic ssl handshake failure before realizing i'd pasted the wrong id into the account id field, not a code bug at all.
I added rate limiting to my AI expense tracker's auth routes. almost gave every route the same 5-per-minute limit then realized that breaks password reset: a 6-digit code lives 15 minutes, so 5/min actually allows ~75 guesses. Fixed: window now matches the code's ttl.
Debugging my expense tracker today: spent an hour convinced my new filter code was broken. It turns out two servers were running on the same port my live one, and a stale build from hours earlier quietly answering every request. the bug never existed.
Building an AI expense tracker as a side project upload a bank statement pdf, an LLM reads it and categorizes every transaction. spent tonight on the actual AI call and ran into something worth a thread
I had to grep the actual .d.ts file inside the installed package instead. that's the literal contract the code enforces, not someone's summary of it. found the real method and the real schema shape.
I couldn't even tell which was current just from reading docs. the sdk moves fast enough that doc pages don't always match what's actually shipped in the package version sitting in your node_modules. This is kinda weird cos docs are always source of truth.
Working on refresh tokens for my auth system and had to hash them with sha256 instead of bcrypt. bcrypt re-salts every time you call it so you literally can't look up an exact match in the db. small thing but it'll bite you if you don't know it upfront
I almost coupled email sending straight into notification worker one job doing both. Caught myself: what happens when I need email without an in-app notification?
Now notifications create records, email is a separate, injectable service. Neither knows the other exists.
#NestJS