> ## Documentation Index
> Fetch the complete documentation index at: https://acme-c84a37e5.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# allOrThrow

> Executes multiple tasks and throws on the first failure

## Signature

`allOrThrow<T>(tasks, options?): Promise<T[]>`

## Options

* Inherits all `run` options
* `concurrency`: simultaneous limit

## Example

```typescript theme={null}
import { allOrThrow } from "tryo";

const data = await allOrThrow<string>(
  [
    () => fetch("/a").then((r) => r.text()),
    () => fetch("/b").then((r) => r.text()),
  ],
  { concurrency: 2 }
);
```

If a task fails, the normalized error is thrown.
