

# Fix validation issues

 AWS Context checks a draft at three points: when the induction creates it, each time you save it, and when you publish it. The checks report two kinds of issues:
+  **Warnings** – The draft passed the checks, but we recommend that you review these items. Warnings don’t stop a save or a publish.
+  **Errors** – The draft failed the checks. The save or publish fails, and nothing changes until you fix the errors.

 AWS Context checks a draft the same way that it checks an uploaded ontology. For information about the issue codes, see [Errors and warnings after an upload](ontology-byo-issues.md).

## Review warnings
<a name="ontology-fix-validation-warnings"></a>

On the AWS Context console, the induction’s page shows **Generation finished with warnings** when the draft has warnings. With the API, [`GetOntology`](https://docs.aws.amazon.com/context/latest/APIReference/API_GetOntology.html) returns the warnings in `validationIssues`. The list has at most 100 entries. If there are more, the last entry says how many more there are.

## Fix errors
<a name="ontology-fix-validation-errors-fix"></a>

When a save or a publish fails the checks, the call fails with a `ValidationException`, and nothing changes. The error message lists each issue on its own line. The `fieldList` has one entry for each issue, up to 100. If there are more, the last entry says how many more there are. Each entry’s `name` is `draft.source`. Its `message` has the issue’s code, its line and Internationalized Resource Identifier (IRI) where known, and its text. When the checks find that the draft is too large to store, the issue’s code is `INDUCED_TOO_LARGE`. A few errors have only a message and no `fieldList`. One example is a request that breaks a length or format rule of the API. Another is a draft that passes the checks but is still too large to store when you save or publish it.

To fix a validation error, follow these steps:

1. In the error, find the line or IRI that the issue names.

1. Correct the draft at that line or IRI.

1. Save the draft again.

If the draft passes the checks, the save succeeds.