How async Functions Return Promises
See how an async function always returns a promise, how return and throw become fulfillment and rejection, and why the body runs until the first await.

Put the word async in front of a function and its return type changes, whatever the body does. A function that returns 5 now returns a promise of 5. A function that throws now returns a rejected promise and does not throw at all. Those two facts explain most of the surprises people meet in their first month of async/await, such as the Promise { 5 } printed where a number was expected, or the try/catch that misses an error because the call was never awaited. This post explains the rules on Node.js 24, shows what happens before the first await, covers what a returned promise does to the result, and lists the habits that keep error handling honest. It builds on how promises settle.
The rule
An async function always returns a promise. If the body completes with a value, the promise fulfills with that value. If the body throws, the promise rejects with the thrown value. There is no third outcome, and the function never throws to its caller.
async function five() {
return 5;
}
async function boom() {
throw new Error("failed inside");
}
console.log(five());
console.log(await five());
const rejected = boom();
console.log(rejected instanceof Promise);
await rejected.catch((error) => console.log("caught:", error.message));Promise { 5 }
5
true
caught: failed insideThe call to five() printed a promise that is already fulfilled. boom() did not throw when called. It handed back a rejected promise, and the error appeared only when something handled the rejection. If you forget both await and catch, Node.js reports an unhandled rejection later, and on current versions that terminates the process.
What runs synchronously
An async function does not defer its body. It starts running at once, on the caller's stack, and keeps going until it reaches the first await. Only then does it hand control back, and everything after that await runs later.
async function demo() {
console.log("1: inside, before await");
await null;
console.log("3: inside, after await");
}
console.log("0: before call");
const promise = demo();
console.log("2: after call");
await promise;0: before call
1: inside, before await
2: after call
3: inside, after awaitLine 1 printed before line 2, so the function body ran synchronously up to the await. This matters when a function does work before its first await, such as validating arguments. A throw in that stretch still becomes a rejection, but side effects like logging or mutating a variable happen immediately, in the order you wrote them.
Returning values and returning promises
If the body returns a plain value, the result is a promise fulfilled with it. If it returns a promise, the result follows that promise. You never get a promise of a promise, because promises flatten.
async function plain() {
return "value";
}
async function viaPromise() {
return Promise.resolve("from a promise");
}
async function viaThenable() {
return { then: (resolve) => resolve("from a thenable") };
}
console.log(await plain());
console.log(await viaPromise());
console.log(await viaThenable());value
from a promise
from a thenableAll three results are strings after await. The flattening is what lets an async function call another and return its promise directly without unwrapping it first.
return versus return await
Inside a try block, there is a real difference between returning a promise and returning an awaited one. A bare return promise hands the promise out, and a rejection happens after the function has already left the try, so the catch does not see it.
const failLater = () => Promise.reject(new Error("late failure"));
async function withoutAwait() {
try {
return failLater();
} catch (error) {
return "handled inside";
}
}
async function withAwait() {
try {
return await failLater();
} catch (error) {
return "handled inside";
}
}
console.log(await withAwait());
try {
console.log(await withoutAwait());
} catch (error) {
console.log("escaped the try:", error.message);
}handled inside
escaped the try: late failureOutside a try, the two forms behave the same for the caller, and a lint rule that bans return await there is reasonable. Inside a try, return await is the correct form whenever you want the catch or a finally to apply to the returned promise.
Rejections from arguments and early checks
Because the whole body is covered, even argument validation becomes a rejection, and that consistency is the main reason to make a function async when it has failure modes.
async function loadUser(id) {
if (!Number.isInteger(id)) {
throw new TypeError(`id must be an integer, got ${typeof id}`);
}
return { id };
}
console.log(await loadUser(3));
await loadUser("3").catch((error) => console.log(error.name, "-", error.message));{ id: 3 }
TypeError - id must be an integer, got stringA plain function with the same check would throw synchronously, and callers who only wrote .catch() would miss it. The async version has one failure channel.
Everything is wrapped, even simple returns
Each call to an async function creates a new promise object, so two calls never return the same one, even for the same cached value.
const cache = { value: 42 };
async function getCached() {
return cache.value;
}
console.log(getCached() === getCached());falseIf you rely on identity, such as storing the promise in a map to deduplicate requests, store the promise from the first call and reuse it explicitly. Calling the function again creates a fresh wrapper each time.
Why this design
The rule keeps the contract simple for callers. Any function marked async can be awaited, chained with then, passed to Promise.all or handed to a library that expects a promise, with no check of what it really returns. It also lets you convert existing code gradually, since turning a function into an async one changes only its return type, from a value to a promise of that value.
The price is a small amount of overhead for functions that never wait. A function that only does synchronous work and is marked async still allocates a promise and defers the continuation of its callers. For code on a hot path, such as a function called a million times in a loop, that is a reason to keep it synchronous and use async only for functions that actually wait.
Three common mistakes
The first is forgetting await on a call whose result you need. The variable then holds a promise, and any property read on it gives undefined. A lint rule for floating promises catches this automatically, and it is worth turning on.
The second is using async on a callback that a library does not await, such as an event handler or an array method. The function returns a promise that nobody handles, and a thrown error becomes an unhandled rejection instead of a visible crash in the right place. Handle errors inside the callback, or pass it through a helper that awaits and reports them.
The third is mixing async functions and forEach. The loop starts every callback and ignores the promises they return, so code after the loop runs before the work is done. Use for...of with await to run steps in order, or Promise.all with map to run them together.
When this does not apply
Generators and async generators have their own return types. An async function* returns an async iterator and not a promise, and a plain generator returns an iterator. Class constructors cannot be async, so asynchronous setup goes into a static factory method that returns a promise of the instance. And top-level code in a module can use await directly, without an enclosing function, which is the one place you can wait without declaring async.
Reading unfamiliar async code
When you open a codebase full of async functions, one habit speeds up understanding: at every call, ask whether the result is awaited, returned or dropped. Awaited means the caller waits and sees errors. Returned means the caller's caller takes over both. Dropped means the work is fire and forget, and any failure goes to the unhandled rejection handler. Dropped calls are sometimes right, such as sending analytics, and should be marked on purpose with a comment or a void operator so the next reader knows it was a decision.


