Timeouts Don't Cancel Work: Deadlines, Cancellation, and the Unknown Outcome
Here's a pattern that shows up in a lot of codebases:
try {
const res = await fetch(`${PAYMENTS}/charge`, {
method: "POST",
body: JSON.stringify(order),
signal: AbortSignal.timeout(5000)
simplyexplained.hashnode.dev9 min read