# RetryWithErrorOutputParser

> **Class** in `langchain_classic`

📖 [View in docs](https://reference.langchain.com/python/langchain-classic/output_parsers/retry/RetryWithErrorOutputParser)

Wrap a parser and try to fix parsing errors.

Does this by passing the original prompt, the completion, AND the error
that was raised to another language model and telling it that the completion
did not work, and raised the given error. Differs from RetryOutputParser
in that this implementation provides the error that was raised back to the
LLM, which in theory should give it more information on how to fix it.

## Signature

```python
RetryWithErrorOutputParser()
```

## Extends

- `BaseOutputParser[T]`

## Properties

- `parser`
- `retry_chain`
- `max_retries`
- `legacy`
- `OutputType`

## Methods

- [`from_llm()`](https://reference.langchain.com/python/langchain-classic/output_parsers/retry/RetryWithErrorOutputParser/from_llm)
- [`parse_with_prompt()`](https://reference.langchain.com/python/langchain-classic/output_parsers/retry/RetryWithErrorOutputParser/parse_with_prompt)
- [`aparse_with_prompt()`](https://reference.langchain.com/python/langchain-classic/output_parsers/retry/RetryWithErrorOutputParser/aparse_with_prompt)
- [`parse()`](https://reference.langchain.com/python/langchain-classic/output_parsers/retry/RetryWithErrorOutputParser/parse)
- [`get_format_instructions()`](https://reference.langchain.com/python/langchain-classic/output_parsers/retry/RetryWithErrorOutputParser/get_format_instructions)

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/fb6ab993a73180538f6cca876b3c85d46c08845f/libs/langchain/langchain_classic/output_parsers/retry.py#L187)