> For the complete documentation index, see [llms.txt](https://docs.internetobject.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.internetobject.org/parsing-and-errors/error-accumulation.md).

# Error Accumulation

Rather than stopping at the first problem, a conformant processor **accumulates** errors and returns them together, alongside whatever data parsed successfully. This gives authors a full picture in one pass.

## Per-object validation errors

Each record is validated independently and may contribute **zero, one, or many** errors. A failing record is marked as an error; the others are unaffected:

```ruby
~ $schema: { name: string, age: { int, max: 25 } }
---
~ James, 20    # ✓
~ Alex, 30     # ✗ invalid-range
~ Bob, 22      # ✓
```

The result contains two valid records and one error entry — not a single fatal failure.

## Per-region syntax errors

Syntax errors are accumulated per recovered region (between boundaries). One unparsable record yields one error, and parsing resumes at the next `~` or `---`.

## Partial output

Because errors are accumulated rather than thrown, the loaded result includes the records that succeeded. Consumers can render valid data and surface the error list side by side (for example, editor markers at each error's position).

## Duplicate section names

When two sections share a name, the duplicate is **automatically renamed** (`users` → `users_2` → `users_3`), so the rest of the document still loads.

## See Also

* [Error Model](/parsing-and-errors/error-model.md) · [Parser Behavior & Recovery](/parsing-and-errors/parser-behavior.md)
* [Collection Rules](/collections/collection-rules.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.internetobject.org/parsing-and-errors/error-accumulation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
