# DocumentGeneratedError

Output type describing a failed document generation.

> Kind: Apex type · Updated: 2026-07-03

Custom Apex type representing an error output returned by the Client.getEventDetails() method's ErrorEvent handling. It identifies the template and record for a document generation that failed.

## Fields

### Output fields
| Parameter | Type | Required | Description |
|---|---|---|---|
| TemplateId | String | optional | Id of the template the document was generated from. |
| Context | String | optional | Context attribute describing the source of the generation. |
| RecordId | String | optional | Salesforce Record Id associated with the generation. |
