---
title: "Await every async call · Agent Wranglers"
url: https://agentwranglers.se/playbook/architecture/errors-and-nulls/await-every-promise
updated: 2026-10-20
licence: "All rights reserved"
---

# Await every async call

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Required
- Chapter: [Errors and nulls](https://agentwranglers.se/playbook/architecture/errors-and-nulls)
- Rule: Await every promise, task or future, or hand it to code that handles its errors. A call that nobody waits for loses its errors without a trace.
- How: Use one async style across the codebase, such as `async` and `await`, instead of mixing callbacks and promise chains. When work must run in the background, pass it to a queue or a task runner that logs failures.
- Check: A linter fails on unhandled async calls. Examples are typescript-eslint `no-floating-promises` and `no-misused-promises`, Ruff `RUF006` for asyncio tasks, and for C# the compiler warning `CS4014` plus the analyzer `VSTHRD100` against `async void`.

Example:

```ts
// Bad: if sending fails, nobody ever knows
function placeOrder(order: Order) {
  saveOrder(order);
  sendConfirmation(order);
}

// Good: errors reach the caller
async function placeOrder(order: Order) {
  await saveOrder(order);
  await sendConfirmation(order);
}
```

```python
# Bad: the task runs on its own, and its error is lost
async def place_order(order):
    asyncio.create_task(send_confirmation(order))

# Good: errors reach the caller
async def place_order(order):
    await save_order(order)
    await send_confirmation(order)
```

```csharp
// Bad: async void hides the failure
async void PlaceOrder(Order order) { await SaveOrder(order); }

// Good: return the Task, so the caller awaits it
async Task PlaceOrder(Order order) { await SaveOrder(order); }
```

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers architecture playbook: https://agentwranglers.se/playbook/architecture/errors-and-nulls/await-every-promise`.

- Previous: [Never swallow errors](https://agentwranglers.se/playbook/architecture/errors-and-nulls/never-swallow-errors)
- [Errors and nulls](https://agentwranglers.se/playbook/architecture/errors-and-nulls)
