# TourOrchestrator

**Kind:** Class

**Source:** [`atloria-monorepo/packages/tour-widget/src/orchestrator.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/packages/tour-widget/src/orchestrator.ts#L54)

## Methods

| Method | Signature | Returns |
|---|---|---|
| `init` | `init()` | `Promise<void>` |

## Where it refuses work

- `TourOrchestrator` stops the work with an early return when `!res.ok`, in 2 places.
- `TourOrchestrator` stops the work with an early return when `busy`.
- `TourOrchestrator` stops the work with an early return when `!isEligibleForAuto(exp, this.state)`.
- `TourOrchestrator` stops the work with an early return when `!items[idx]`.
- `TourOrchestrator` stops the work with an early return when `!states`.
- `TourOrchestrator` stops the work with an early return when `location.href === this.lastUrl`.

## When something fails

- `TourOrchestrator` handles failure in 15 places: it discards it silently in 10, turns it into a return value in 3, and logs it and continues in 2.
