# TroubleshootingGenerator

**Kind:** Class

**Source:** [`atloria-monorepo/packages/doc-automation/src/v2/stages/stage-14-meta/generators/troubleshooting.generator.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/packages/doc-automation/src/v2/stages/stage-14-meta/generators/troubleshooting.generator.ts#L45)

## Methods

| Method | Signature | Returns |
|---|---|---|
| `extractTroubleshootingSections` | `extractTroubleshootingSections(documents: Array<{ title: string; slug: string; content?: string }>)` | `ExtractedTroubleshootingSection[]` |
| `generate` | `generate(input: TroubleshootingGeneratorInput, templates: FixedDocTemplate[], reference: MetaCategoryReference)` | `Promise<{
    documents: GeneratedDocument[];
    promptTokens: number;
    completionTokens: number;
  }>` |
| `generateOverview` | `generateOverview(input: TroubleshootingGeneratorInput, templates: FixedDocTemplate[], reference: MetaCategoryReference)` | `Promise<{
    documents: GeneratedDocument[];
    promptTokens: number;
    completionTokens: number;
  }>` |

## Where it refuses work

- `TroubleshootingGenerator` stops the work with an early return when `templates && templates.length > 0`.
- `TroubleshootingGenerator` stops the work with an early return when `sections.length === 0`.

## When something fails

- `TroubleshootingGenerator` handles failure in 5 places: it logs it and continues in all 5.
